-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working prototype; digital and analog
- Loading branch information
Showing
17 changed files
with
1,439 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using UnityEngine; | ||
using System; | ||
|
||
public class ClockAnimator : MonoBehaviour | ||
{ | ||
public Transform hours, minutes, seconds; | ||
private const float | ||
hoursToDegrees = 360f / 12f, | ||
minutesToDegrees = 360f / 60f, | ||
secondsToDegrees = 360f / 60f; | ||
public bool analog; | ||
|
||
// Update is called once per frame | ||
void Update() | ||
{ | ||
if (analog) | ||
{ | ||
TimeSpan timespan = DateTime.Now.TimeOfDay; | ||
|
||
hours.localRotation = Quaternion.Euler(0f, 0f, (float)timespan.TotalHours * hoursToDegrees); | ||
minutes.localRotation = Quaternion.Euler(0f, 0f, (float)timespan.TotalMinutes * minutesToDegrees); | ||
seconds.localRotation = Quaternion.Euler(0f, 0f, (float)timespan.TotalSeconds * secondsToDegrees); | ||
} | ||
else | ||
{ | ||
DateTime time = DateTime.Now; | ||
|
||
hours.localRotation = Quaternion.Euler(0f, 0f, time.Hour * hoursToDegrees); | ||
minutes.localRotation = Quaternion.Euler(0f, 0f, time.Minute * minutesToDegrees); | ||
seconds.localRotation = Quaternion.Euler(0f, 0f, time.Second * secondsToDegrees); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!11 &1 | ||
AudioManager: | ||
m_ObjectHideFlags: 0 | ||
m_Volume: 1 | ||
Rolloff Scale: 1 | ||
m_SpeedOfSound: 347 | ||
Doppler Factor: 1 | ||
Default Speaker Mode: 2 | ||
m_DSPBufferSize: 0 | ||
m_DisableAudio: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!55 &1 | ||
PhysicsManager: | ||
m_ObjectHideFlags: 0 | ||
m_Gravity: {x: 0, y: -9.81000042, z: 0} | ||
m_DefaultMaterial: {fileID: 0} | ||
m_BounceThreshold: 2 | ||
m_SleepVelocity: .150000006 | ||
m_SleepAngularVelocity: .140000001 | ||
m_MaxAngularVelocity: 7 | ||
m_MinPenetrationForPenalty: .00999999978 | ||
m_SolverIterationCount: 6 | ||
m_RaycastsHitTriggers: 1 | ||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!1045 &1 | ||
EditorBuildSettings: | ||
m_ObjectHideFlags: 0 | ||
serializedVersion: 2 | ||
m_Scenes: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!159 &1 | ||
EditorSettings: | ||
m_ObjectHideFlags: 0 | ||
serializedVersion: 3 | ||
m_ExternalVersionControlSupport: Visible Meta Files | ||
m_SerializationMode: 2 | ||
m_WebSecurityEmulationEnabled: 0 | ||
m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d | ||
m_DefaultBehaviorMode: 0 | ||
m_SpritePackerMode: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!30 &1 | ||
GraphicsSettings: | ||
m_ObjectHideFlags: 0 | ||
m_AlwaysIncludedShaders: | ||
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,246 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!13 &1 | ||
InputManager: | ||
m_ObjectHideFlags: 0 | ||
m_Axes: | ||
- serializedVersion: 3 | ||
m_Name: Horizontal | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: left | ||
positiveButton: right | ||
altNegativeButton: a | ||
altPositiveButton: d | ||
gravity: 3 | ||
dead: .00100000005 | ||
sensitivity: 3 | ||
snap: 1 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Vertical | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: down | ||
positiveButton: up | ||
altNegativeButton: s | ||
altPositiveButton: w | ||
gravity: 3 | ||
dead: .00100000005 | ||
sensitivity: 3 | ||
snap: 1 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Fire1 | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: left ctrl | ||
altNegativeButton: | ||
altPositiveButton: mouse 0 | ||
gravity: 1000 | ||
dead: .00100000005 | ||
sensitivity: 1000 | ||
snap: 0 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Fire2 | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: left alt | ||
altNegativeButton: | ||
altPositiveButton: mouse 1 | ||
gravity: 1000 | ||
dead: .00100000005 | ||
sensitivity: 1000 | ||
snap: 0 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Fire3 | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: left cmd | ||
altNegativeButton: | ||
altPositiveButton: mouse 2 | ||
gravity: 1000 | ||
dead: .00100000005 | ||
sensitivity: 1000 | ||
snap: 0 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Jump | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: space | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 1000 | ||
dead: .00100000005 | ||
sensitivity: 1000 | ||
snap: 0 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Mouse X | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 0 | ||
dead: 0 | ||
sensitivity: .100000001 | ||
snap: 0 | ||
invert: 0 | ||
type: 1 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Mouse Y | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 0 | ||
dead: 0 | ||
sensitivity: .100000001 | ||
snap: 0 | ||
invert: 0 | ||
type: 1 | ||
axis: 1 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Mouse ScrollWheel | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 0 | ||
dead: 0 | ||
sensitivity: .100000001 | ||
snap: 0 | ||
invert: 0 | ||
type: 1 | ||
axis: 2 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Horizontal | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 0 | ||
dead: .189999998 | ||
sensitivity: 1 | ||
snap: 0 | ||
invert: 0 | ||
type: 2 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Vertical | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 0 | ||
dead: .189999998 | ||
sensitivity: 1 | ||
snap: 0 | ||
invert: 1 | ||
type: 2 | ||
axis: 1 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Fire1 | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: joystick button 0 | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 1000 | ||
dead: .00100000005 | ||
sensitivity: 1000 | ||
snap: 0 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Fire2 | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: joystick button 1 | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 1000 | ||
dead: .00100000005 | ||
sensitivity: 1000 | ||
snap: 0 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Fire3 | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: joystick button 2 | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 1000 | ||
dead: .00100000005 | ||
sensitivity: 1000 | ||
snap: 0 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 | ||
- serializedVersion: 3 | ||
m_Name: Jump | ||
descriptiveName: | ||
descriptiveNegativeName: | ||
negativeButton: | ||
positiveButton: joystick button 3 | ||
altNegativeButton: | ||
altPositiveButton: | ||
gravity: 1000 | ||
dead: .00100000005 | ||
sensitivity: 1000 | ||
snap: 0 | ||
invert: 0 | ||
type: 0 | ||
axis: 0 | ||
joyNum: 0 |
Oops, something went wrong.