Commit eb181ae9 authored by mmaluschnig's avatar mmaluschnig
Browse files

added exit stuff to mime meime

parent c794b085
<Properties StartupConfiguration="{67A4F128-F6AC-CD88-DA35-F29416A0792A}|">
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="Unity.Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/DaytimeScripts/CharacterSpeech/SilasSpeech.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/MimeScripts/SpawnKeys.cs">
<Files>
<File FileName="Assets/Scripts/PieScripts/PieManager.cs" Line="49" Column="17" />
<File FileName="Assets/Scripts/MimeScripts/LevelManager.cs" Line="39" Column="11" />
<File FileName="Assets/Scripts/TrapezeScripts/TrapezeController.cs" Line="64" Column="29" />
<File FileName="Assets/Scripts/MimeScripts/SpawnKeys.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/MimeScripts/TriggerManager.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/DaytimeScripts/CharacterSpeech/PaperSpeech.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/DaytimeScripts/PaperController.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/DaytimeScripts/IntroTent.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/DaytimeScripts/CharacterSpeech/AhavaSpeech.cs" Line="140" Column="55" />
<File FileName="Assets/Scripts/DaytimeScripts/CharacterSpeech/SilasSpeech.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
......
......@@ -2515,6 +2515,77 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1202603867}
m_CullTransparentMesh: 0
--- !u!1 &1216935864
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1216935865}
- component: {fileID: 1216935867}
- component: {fileID: 1216935866}
m_Layer: 5
m_Name: gameOverPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1216935865
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1216935864}
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:
- {fileID: 2097920841}
- {fileID: 1272109651}
m_Father: {fileID: 1542602636}
m_RootOrder: 1
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: 0, y: 0}
m_SizeDelta: {x: 300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1216935866
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1216935864}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.3773585, g: 0, b: 0, a: 0.6784314}
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_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &1216935867
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1216935864}
m_CullTransparentMesh: 0
--- !u!1 &1241441964
GameObject:
m_ObjectHideFlags: 0
......@@ -2797,6 +2868,81 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1270994738}
m_CullTransparentMesh: 0
--- !u!1 &1272109650
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1272109651}
- component: {fileID: 1272109653}
- component: {fileID: 1272109652}
m_Layer: 5
m_Name: exittext
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1272109651
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1272109650}
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: 1216935865}
m_RootOrder: 1
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: 0, y: -22}
m_SizeDelta: {x: 280, y: 52.7}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1272109652
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1272109650}
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: 46
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 56
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Exit in 5
--- !u!222 &1272109653
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1272109650}
m_CullTransparentMesh: 0
--- !u!1 &1368033451
GameObject:
m_ObjectHideFlags: 0
......@@ -3312,6 +3458,7 @@ RectTransform:
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 333498656}
- {fileID: 1216935865}
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -4415,3 +4562,78 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2091195627}
m_CullTransparentMesh: 0
--- !u!1 &2097920840
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2097920841}
- component: {fileID: 2097920843}
- component: {fileID: 2097920842}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2097920841
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2097920840}
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: 1216935865}
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: 0, y: 22}
m_SizeDelta: {x: 280, y: 52.7}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2097920842
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2097920840}
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: 46
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 56
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Times Up!
--- !u!222 &2097920843
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2097920840}
m_CullTransparentMesh: 0
......@@ -814,7 +814,7 @@ GameObject:
- component: {fileID: 847592696}
m_Layer: 0
m_Name: LevelMaster
m_TagString: Untagged
m_TagString: LevelMaster
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
......@@ -1424,7 +1424,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 1602431506710890, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
......@@ -2610,6 +2610,7 @@ MonoBehaviour:
flipParticles: {fileID: 1044449210632190, guid: bf8747e4259d9bd46acdd2b6e3588586,
type: 2}
flipText: {fileID: 1055966192}
end: 0
--- !u!114 &2089978963
MonoBehaviour:
m_ObjectHideFlags: 0
......
......@@ -10,17 +10,35 @@ public class LevelManager : MonoBehaviour {
public Text score;
public Text combo;
public GameObject exitPanel;
public Text exitText;
private bool gameOver;
private float exitTime;
private float preExitTime;
// Use this for initialization
void Start () {
exitTime = Mathf.Infinity;
preExitTime = Mathf.Infinity;
MimeMime.resetScore();
}
private void FixedUpdate() {
score.text = "Score: " + (int)MimeMime.PlayerScore;
combo.text = "Combo: " + MimeMime.Combo;
if(Time.time > exitTime){
exitText.text = "Exit in " + ((int)(exitTime - Time.time + 0.98f)).ToString();
if (Time.time > preExitTime && !gameOver)
{
gameOver = true;
exitPanel.SetActive(true);
exitTime = Time.time + 5;
}
if (Time.time > exitTime){
float levels = MimeMime.PlayerScore / 4000;
GameManager.addToLevel("Silas", levels);
SceneManager.LoadScene("Daytime");
......@@ -28,7 +46,8 @@ public class LevelManager : MonoBehaviour {
}
public void SongFinished(){
//maybe meke it fade out
exitTime = Time.time + 5;
//last key spawns here
preExitTime = Time.time + 3;
}
}
......@@ -45,6 +45,7 @@ public class TrapezeController : MonoBehaviour {
gameOver = true;
exitTime = Time.time + 5;
GameOverPanel.SetActive(true);
GameObject.FindWithTag("Player").GetComponent<TrapezePerson>().end = true;
}
if (Time.time > exitTime) {
......
......@@ -31,6 +31,7 @@ public class TrapezePerson : MonoBehaviour {
public Text flipText;
private Animator anim;
public bool end;
// Use this for initialization
......@@ -47,42 +48,46 @@ public class TrapezePerson : MonoBehaviour {
void Update () {
checkFlip();
checkRotating();
if (GameManager.JohnTutorial && GameManager.TutorialState < 1)
{
//dont allow to swing or let go
}
else
if (!end)
{
if (Input.GetKey(KeyCode.D) || Input.GetKeyDown(KeyCode.RightArrow))
if (GameManager.JohnTutorial && GameManager.TutorialState < 1)
{
if (onTrapeze)
//dont allow to swing or let go
}
else
{
if (Input.GetKey(KeyCode.D) || Input.GetKeyDown(KeyCode.RightArrow))
{
body.AddTorque(swingForce / 10);
if (onTrapeze)
{
body.AddTorque(swingForce / 10);
}
else
{
transform.RotateAround(currentPivot.position, Vector3.forward, -rotateForce);
}
}
else
if (Input.GetKey(KeyCode.A) || Input.GetKeyDown(KeyCode.LeftArrow))
{
transform.RotateAround(currentPivot.position, Vector3.forward, -rotateForce);
if (onTrapeze)
{
body.AddTorque(-swingForce / 10);
}
else
{
transform.RotateAround(currentPivot.position, Vector3.forward, rotateForce);
}
}
}
if (Input.GetKey(KeyCode.A) || Input.GetKeyDown(KeyCode.LeftArrow))
{
if (onTrapeze)
if (GameManager.JohnTutorial && GameManager.TutorialState == 1)
{
body.AddTorque(-swingForce / 10);
//dont allow to let go
}
else
{
transform.RotateAround(currentPivot.position, Vector3.forward, rotateForce);
}
}
if (GameManager.JohnTutorial && GameManager.TutorialState == 1)
{
//dont allow to let go
}else{
if (onTrapeze && Input.GetKeyDown(KeyCode.Space))
{
releaseTrapeze();
if (onTrapeze && Input.GetKeyDown(KeyCode.Space))
{
releaseTrapeze();
}
}
}
}
......
m_EditorVersion: 2018.2.11f1
m_EditorVersion: 2018.2.12f1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment