Skip to content

Commit

Permalink
Working prototype; digital and analog
Browse files Browse the repository at this point in the history
  • Loading branch information
lirrik committed Oct 7, 2014
1 parent c1e727f commit 21c26a7
Show file tree
Hide file tree
Showing 17 changed files with 1,439 additions and 0 deletions.
497 changes: 497 additions & 0 deletions Assets/Clock.unity

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Assets/Clock.unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions Assets/ClockAnimator.cs
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);
}
}
}
8 changes: 8 additions & 0 deletions Assets/ClockAnimator.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions ProjectSettings/AudioManager.asset
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
15 changes: 15 additions & 0 deletions ProjectSettings/DynamicsManager.asset
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
7 changes: 7 additions & 0 deletions ProjectSettings/EditorBuildSettings.asset
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: []
12 changes: 12 additions & 0 deletions ProjectSettings/EditorSettings.asset
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
7 changes: 7 additions & 0 deletions ProjectSettings/GraphicsSettings.asset
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}
246 changes: 246 additions & 0 deletions ProjectSettings/InputManager.asset
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
Loading

0 comments on commit 21c26a7

Please sign in to comment.