Commit 09f5b4bc authored by Andrew R Van Buren's avatar Andrew R Van Buren

Merge branch 'fixes' into 'master'

Fixes

See merge request !64
parents b0665e8f 160bb133
...@@ -13,49 +13,49 @@ AnimatorController: ...@@ -13,49 +13,49 @@ AnimatorController:
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: walk state - m_Name: walk state
m_Type: 1 m_Type: 1
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: on ground - m_Name: on ground
m_Type: 4 m_Type: 4
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: on wall - m_Name: on wall
m_Type: 4 m_Type: 4
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: is wall sliding - m_Name: is wall sliding
m_Type: 4 m_Type: 4
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: is dashing - m_Name: is dashing
m_Type: 4 m_Type: 4
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: is dead - m_Name: is dead
m_Type: 4 m_Type: 4
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: jump failed - m_Name: jump failed
m_Type: 9 m_Type: 9
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
m_AnimatorLayers: m_AnimatorLayers:
- serializedVersion: 5 - serializedVersion: 5
m_Name: Base Layer m_Name: Base Layer
...@@ -655,6 +655,30 @@ AnimatorStateTransition: ...@@ -655,6 +655,30 @@ AnimatorStateTransition:
m_InterruptionSource: 0 m_InterruptionSource: 0
m_OrderedInterruption: 1 m_OrderedInterruption: 1
m_CanTransitionToSelf: 1 m_CanTransitionToSelf: 1
--- !u!1101 &1101839230351870134
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: is dead
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102112602750143940}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.1
m_TransitionOffset: 0
m_ExitTime: 0.9
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101909886002805576 --- !u!1101 &1101909886002805576
AnimatorStateTransition: AnimatorStateTransition:
m_ObjectHideFlags: 3 m_ObjectHideFlags: 3
...@@ -1127,6 +1151,7 @@ AnimatorStateMachine: ...@@ -1127,6 +1151,7 @@ AnimatorStateMachine:
m_ChildStateMachines: [] m_ChildStateMachines: []
m_AnyStateTransitions: m_AnyStateTransitions:
- {fileID: 1101125233811007622} - {fileID: 1101125233811007622}
- {fileID: 1101839230351870134}
m_EntryTransitions: [] m_EntryTransitions: []
m_StateMachineTransitions: m_StateMachineTransitions:
data: data:
......
...@@ -23,7 +23,7 @@ GameObject: ...@@ -23,7 +23,7 @@ GameObject:
- component: {fileID: 58460928687217622} - component: {fileID: 58460928687217622}
- component: {fileID: 50635277209838516} - component: {fileID: 50635277209838516}
- component: {fileID: 114154880416009188} - component: {fileID: 114154880416009188}
m_Layer: 0 m_Layer: 10
m_Name: CaramelBullet m_Name: CaramelBullet
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -38,7 +38,7 @@ Transform: ...@@ -38,7 +38,7 @@ Transform:
m_GameObject: {fileID: 1971150978506544} m_GameObject: {fileID: 1971150978506544}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.84, y: 0.16, z: 2.3632812} m_LocalPosition: {x: 3.84, y: 0.16, z: 2.3632812}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
...@@ -59,7 +59,7 @@ Rigidbody2D: ...@@ -59,7 +59,7 @@ Rigidbody2D:
m_AngularDrag: 0.05 m_AngularDrag: 0.05
m_GravityScale: 0 m_GravityScale: 0
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Interpolate: 0 m_Interpolate: 1
m_SleepingMode: 1 m_SleepingMode: 1
m_CollisionDetection: 0 m_CollisionDetection: 0
m_Constraints: 4 m_Constraints: 4
......
This diff is collapsed.
...@@ -583,7 +583,7 @@ Transform: ...@@ -583,7 +583,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1784255690954616} m_GameObject: {fileID: 1784255690954616}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.63, y: 3.54, z: 0} m_LocalPosition: {x: 16.55, y: 6.36, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 4838104525842692} - {fileID: 4838104525842692}
...@@ -1007,7 +1007,11 @@ MonoBehaviour: ...@@ -1007,7 +1007,11 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
inputButtons: inputButtons:
disableScripts: [] disableScripts:
- {fileID: 114296284101528218}
- {fileID: 114496983445290320}
- {fileID: 114468523229820794}
state: 0
--- !u!114 &114468523229820794 --- !u!114 &114468523229820794
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1382304722217016}
m_IsPrefabParent: 1
--- !u!1 &1382304722217016
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224836438208060128}
- component: {fileID: 222474643737891492}
- component: {fileID: 114813025803214224}
- component: {fileID: 114401677657256440}
- component: {fileID: 114032482133026322}
m_Layer: 5
m_Name: Timer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &114032482133026322
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1382304722217016}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 1}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!114 &114401677657256440
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1382304722217016}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 1}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!114 &114813025803214224
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1382304722217016}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 5
m_MaxSize: 50
m_Alignment: 1
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 0:00
--- !u!222 &222474643737891492
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1382304722217016}
--- !u!224 &224836438208060128
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1382304722217016}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 100}
m_Pivot: {x: 0.5, y: 1}
fileFormatVersion: 2
guid: 3250d15522aae754884637e591293e42
timeCreated: 1492735056
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
...@@ -27,41 +27,6 @@ GameObject: ...@@ -27,41 +27,6 @@ GameObject:
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!1 &1213563030062332
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224183741010064344}
- component: {fileID: 223259577501980542}
- component: {fileID: 114465074132951858}
- component: {fileID: 114662074409595724}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1358550398907514
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224209094075702104}
- component: {fileID: 222661001081291610}
- component: {fileID: 114712972450195582}
m_Layer: 5
m_Name: Timer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4925115359248076 --- !u!4 &4925115359248076
Transform: Transform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
...@@ -71,48 +36,10 @@ Transform: ...@@ -71,48 +36,10 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children: []
- {fileID: 224183741010064344}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114465074132951858
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1213563030062332}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!114 &114662074409595724
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1213563030062332}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &114705734518377386 --- !u!114 &114705734518377386
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
...@@ -124,100 +51,4 @@ MonoBehaviour: ...@@ -124,100 +51,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: cad3061263b98c140a9a3a49d70204c9, type: 3} m_Script: {fileID: 11500000, guid: cad3061263b98c140a9a3a49d70204c9, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
waitTime: 0 waitTime: 1
timerText: {fileID: 114712972450195582}
--- !u!114 &114712972450195582
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1358550398907514}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 1, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Timer
--- !u!222 &222661001081291610
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1358550398907514}
--- !u!223 &223259577501980542
Canvas:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1213563030062332}
m_Enabled: 1
serializedVersion: 2
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &224183741010064344
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1213563030062332}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 224209094075702104}
m_Father: {fileID: 4925115359248076}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!224 &224209094075702104
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1358550398907514}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 224183741010064344}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -228.5, y: -120.5}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -9,18 +9,19 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -9,18 +9,19 @@ public class GameManager : SingletonBehaviour<GameManager>
//Manages game state. Pause, death, win, changing levels, and level time. //Manages game state. Pause, death, win, changing levels, and level time.
public float waitTime; public float waitTime;
private bool _isPaused; private bool _isPaused;
private float _levelTimer; private float _levelTimer;
public Text timerText; private Text timerText;
private GameObject birb; private GameObject birb;
void Awake() void Awake()
{ {
birb = GameObject.Find("Player"); birb = GameObject.FindGameObjectWithTag("Player");
DontDestroyOnLoad(this); DontDestroyOnLoad(this);
//isPaused = true; //isPaused = true;
} }
public bool isPaused
public bool isPaused
{ {
get get
{ {
...@@ -52,13 +53,20 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -52,13 +53,20 @@ public class GameManager : SingletonBehaviour<GameManager>
public static void Fail() public static void Fail()
{ {
Debug.Log("You have died"); Debug.Log("You have died");
GameManager.instance.Invoke("ReloadScene", GameManager.instance.waitTime); if (!GameManager.instance.birb) {
GameManager.instance.birb = GameObject.FindGameObjectWithTag("Player");
}
if (!GameManager.instance.birb.GetComponent<Birb>().isDead) {
GameManager.instance.birb.SendMessage("Die");
}
GameManager.instance.Invoke("ReloadScene", GameManager.instance.waitTime);
} }
void ReloadScene() void ReloadScene()
{ {
SceneManager.LoadScene(SceneManager.GetActiveScene().name); SceneManager.LoadScene(SceneManager.GetActiveScene().name);
} }
public static void Win() public static void Win()
{ {
Debug.Log("You won!"); Debug.Log("You won!");
} }
...@@ -77,7 +85,10 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -77,7 +85,10 @@ public class GameManager : SingletonBehaviour<GameManager>
//updates the text object //updates the text object
void Update() void Update()
{ {
string currentTime = formatTime(Time.time - levelTimer); if (!timerText) {
timerText = GameObject.FindGameObjectWithTag("Timer").GetComponent<Text>();
}
string currentTime = formatTime(Time.time - levelTimer);
timerText.text = "Time: " + currentTime; timerText.text = "Time: " + currentTime;
} }
......