removed useless _ folders
This commit is contained in:
3
AnalogClock/AnalogClock.sol
Normal file
3
AnalogClock/AnalogClock.sol
Normal file
@@ -0,0 +1,3 @@
|
||||
<Solution name="AnalogClock">
|
||||
<Project name="AnalogClock" path="AnalogClock\AnalogClock.prj" active="true"/>
|
||||
</Solution>
|
||||
10
AnalogClock/AnalogClock/AnalogClock.prj
Normal file
10
AnalogClock/AnalogClock/AnalogClock.prj
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project name="AnalogClock" guid="D61027B9-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D6103831-6C00-1014-B904-200204C60A89">
|
||||
<Script name="AnalogClock_1.lsl" guid="D6113DA3-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
<Script name="AnalogClock_2.lsl" guid="D61155E0-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
<Script name="AnalogClock_3.lsl" guid="D61169E3-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
65
AnalogClock/AnalogClock/Object/AnalogClock_1.lsl
Normal file
65
AnalogClock/AnalogClock/Object/AnalogClock_1.lsl
Normal file
@@ -0,0 +1,65 @@
|
||||
// :CATEGORY:Clock
|
||||
// :NAME:AnalogClock
|
||||
// :AUTHOR:Encog Dod
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:47
|
||||
// :ID:34
|
||||
// :NUM:45
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// AnalogClock
|
||||
// :CODE:
|
||||
// From the book:
|
||||
|
||||
//
|
||||
|
||||
// Scripting Recipes for Second Life
|
||||
|
||||
// by Jeff Heaton (Encog Dod in SL)
|
||||
|
||||
// ISBN: 160439000X
|
||||
|
||||
// Copyright 2007 by Heaton Research, Inc.
|
||||
|
||||
//
|
||||
|
||||
// This script may be freely copied and modified so long as this header
|
||||
|
||||
// remains unmodified.
|
||||
|
||||
//
|
||||
|
||||
// For more information about this book visit the following web site:
|
||||
|
||||
//
|
||||
|
||||
// http://www.heatonresearch.com/articles/series/22/
|
||||
|
||||
|
||||
|
||||
setClock()
|
||||
|
||||
{
|
||||
|
||||
integer t = llRound(llGetWallclock());
|
||||
|
||||
integer hours = t / 3600;
|
||||
|
||||
integer minutes = (t % 3600) / 60;
|
||||
|
||||
integer minutes_angle = minutes;
|
||||
|
||||
integer hours_angle = hours;
|
||||
|
||||
|
||||
|
||||
minutes_angle*=6;
|
||||
|
||||
minutes_angle = 180-minutes_angle;
|
||||
|
||||
|
||||
|
||||
hours_angle *= 30;
|
||||
|
||||
hours_angle+= (minutes/12)*6;
|
||||
62
AnalogClock/AnalogClock/Object/AnalogClock_2.lsl
Normal file
62
AnalogClock/AnalogClock/Object/AnalogClock_2.lsl
Normal file
@@ -0,0 +1,62 @@
|
||||
// :CATEGORY:Clock
|
||||
// :NAME:AnalogClock
|
||||
// :AUTHOR:Encog Dod
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:47
|
||||
// :ID:34
|
||||
// :NUM:46
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Minute Hand
|
||||
// :CODE:
|
||||
// Copyright (c) 2008, Scripting Your World
|
||||
|
||||
// All rights reserved.
|
||||
|
||||
//
|
||||
|
||||
// Scripting Your World
|
||||
|
||||
// By Dana Moore, Michael Thome, and Dr. Karen Zita Haigh
|
||||
|
||||
// http://syw.fabulo.us
|
||||
|
||||
// http://www.amazon.com/Scripting-Your-World-Official-Second/dp/0470339837/
|
||||
|
||||
//
|
||||
|
||||
// You are permitted to use, share, and adapt this code under the
|
||||
|
||||
// terms of the Creative Commons Public License described in full
|
||||
|
||||
// at http://creativecommons.org/licenses/by/3.0/legalcode.
|
||||
|
||||
// That means you must keep the credits, do nothing to damage our
|
||||
|
||||
// reputation, and do not suggest that we endorse you or your work.
|
||||
|
||||
|
||||
|
||||
// Listing 10.2: Clock Hands
|
||||
|
||||
integer gCurrentHour;
|
||||
|
||||
integer gCurrentMin;
|
||||
|
||||
|
||||
|
||||
setHandPosition(integer hours, integer minutes) {
|
||||
|
||||
integer degrees;
|
||||
|
||||
if (llGetObjectName() == "MinuteHand") {
|
||||
|
||||
float degreesPerMinute = 360.0 / 60.0;
|
||||
|
||||
degrees = (integer)(minutes * degreesPerMinute);
|
||||
|
||||
} else {
|
||||
|
||||
if (hours>12) hours -= 12;
|
||||
|
||||
62
AnalogClock/AnalogClock/Object/AnalogClock_3.lsl
Normal file
62
AnalogClock/AnalogClock/Object/AnalogClock_3.lsl
Normal file
@@ -0,0 +1,62 @@
|
||||
// :CATEGORY:Clock
|
||||
// :NAME:AnalogClock
|
||||
// :AUTHOR:Encog Dod
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:47
|
||||
// :ID:34
|
||||
// :NUM:47
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Hour Hand
|
||||
// :CODE:
|
||||
// Copyright (c) 2008, Scripting Your World
|
||||
|
||||
// All rights reserved.
|
||||
|
||||
//
|
||||
|
||||
// Scripting Your World
|
||||
|
||||
// By Dana Moore, Michael Thome, and Dr. Karen Zita Haigh
|
||||
|
||||
// http://syw.fabulo.us
|
||||
|
||||
// http://www.amazon.com/Scripting-Your-World-Official-Second/dp/0470339837/
|
||||
|
||||
//
|
||||
|
||||
// You are permitted to use, share, and adapt this code under the
|
||||
|
||||
// terms of the Creative Commons Public License described in full
|
||||
|
||||
// at http://creativecommons.org/licenses/by/3.0/legalcode.
|
||||
|
||||
// That means you must keep the credits, do nothing to damage our
|
||||
|
||||
// reputation, and do not suggest that we endorse you or your work.
|
||||
|
||||
|
||||
|
||||
// Listing 10.2: Clock Hands
|
||||
|
||||
integer gCurrentHour;
|
||||
|
||||
integer gCurrentMin;
|
||||
|
||||
|
||||
|
||||
setHandPosition(integer hours, integer minutes) {
|
||||
|
||||
integer degrees;
|
||||
|
||||
if (llGetObjectName() == "MinuteHand") {
|
||||
|
||||
float degreesPerMinute = 360.0 / 60.0;
|
||||
|
||||
degrees = (integer)(minutes * degreesPerMinute);
|
||||
|
||||
} else {
|
||||
|
||||
if (hours>12) hours -= 12;
|
||||
|
||||
Reference in New Issue
Block a user