Commit fbbdef32 authored by mmaluschnig's avatar mmaluschnig
Browse files

player has to hold the power for a set time before being allowed to release the pie

parent 1c57e1cb
<Properties StartupConfiguration="{67A4F128-F6AC-CD88-DA35-F29416A0792A}|">
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="Unity.Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/PieScripts/Pie.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/PieScripts/throwManager.cs">
<Files>
<File FileName="Assets/Scripts/DaytimeScripts/CharacterSpeech/AhavaSpeech.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/TrapezeScripts/TrapezeCameraFollow.cs" Line="37" Column="3" />
<File FileName="Assets/Scripts/TrapezeScripts/TrapezePerson.cs" Line="108" Column="31" />
<File FileName="Assets/Scripts/TrapezeScripts/FollowPlayerx.cs" Line="24" Column="16" />
<File FileName="Assets/Scripts/GameManager.cs" Line="23" Column="45" />
<File FileName="Assets/Scripts/MimeScripts/MimeMimeTutorial.cs" Line="125" Column="47" />
<File FileName="Assets/Scripts/MenuScripts/PerformanceMenu.cs" Line="10" Column="9" />
<File FileName="Assets/Scripts/PieScripts/PieTutorial.cs" Line="25" Column="1" />
<File FileName="Assets/Scripts/MimeScripts/TriggerManager.cs" Line="143" Column="32" />
<File FileName="Assets/Scripts/DaytimeScripts/CharacterSpeech/SilasSpeech.cs" Line="28" Column="49" />
<File FileName="Assets/Scripts/DaytimeScripts/CharacterInteractions.cs" Line="79" Column="22" />
<File FileName="Assets/Scripts/PieScripts/PieManager.cs" Line="119" Column="24" />
<File FileName="Assets/Scripts/PieScripts/Pie.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/PieScripts/throwManager.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
......
......@@ -54,7 +54,7 @@ Rigidbody2D:
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 40
m_Mass: 20
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
......
......@@ -1832,6 +1832,7 @@ GameObject:
m_Component:
- component: {fileID: 1243567177}
- component: {fileID: 1243567176}
- component: {fileID: 1243567178}
m_Layer: 0
m_Name: mime-1
m_TagString: Silas
......@@ -1898,6 +1899,24 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &1243567178
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1243567175}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: d7273faaa196a174289c4e32104adb20, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &1270994738
GameObject:
m_ObjectHideFlags: 0
......@@ -2583,6 +2602,7 @@ GameObject:
m_Component:
- component: {fileID: 1809696623}
- component: {fileID: 1809696622}
- component: {fileID: 1809696624}
m_Layer: 0
m_Name: clownDraft-1_0
m_TagString: Player
......@@ -2650,6 +2670,24 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &1809696624
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1809696621}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: ab02b6cdb55ff1a488fc01228184f362, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &1814384667
GameObject:
m_ObjectHideFlags: 0
......
......@@ -2363,6 +2363,7 @@ GameObject:
- component: {fileID: 1243567177}
- component: {fileID: 1243567176}
- component: {fileID: 1243567178}
- component: {fileID: 1243567179}
m_Layer: 0
m_Name: mime-1
m_TagString: Silas
......@@ -2423,7 +2424,7 @@ Transform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1243567175}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.44, y: -0.91, z: 0}
m_LocalPosition: {x: -5.16, y: -1.99, z: 0}
m_LocalScale: {x: 2, y: 2, z: 1}
m_Children:
- {fileID: 1251441223}
......@@ -2441,6 +2442,24 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1d62676c38eb1d449bf303d6056ee1e7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!95 &1243567179
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1243567175}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: d7273faaa196a174289c4e32104adb20, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &1251441222
GameObject:
m_ObjectHideFlags: 0
......@@ -3532,6 +3551,7 @@ GameObject:
m_Component:
- component: {fileID: 1809696623}
- component: {fileID: 1809696622}
- component: {fileID: 1809696624}
m_Layer: 0
m_Name: clownDraft-1_0
m_TagString: Player
......@@ -3592,13 +3612,31 @@ Transform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1809696621}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.13, y: -1.34, z: 0}
m_LocalPosition: {x: 0.08, y: -1.86, z: 0}
m_LocalScale: {x: 2, y: 2, z: 1}
m_Children:
- {fileID: 858685293}
m_Father: {fileID: 0}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &1809696624
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1809696621}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: ab02b6cdb55ff1a488fc01228184f362, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &1814384667
GameObject:
m_ObjectHideFlags: 0
......
......@@ -980,6 +980,8 @@ MonoBehaviour:
simon: {fileID: 1555248103}
speech: {fileID: 1555248109}
button: {fileID: 257364250}
powerPointer: {fileID: 1627361073}
powerBar: {fileID: 2133793784}
--- !u!1 &598049472
GameObject:
m_ObjectHideFlags: 0
......@@ -1866,6 +1868,40 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1163302946
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1163302947}
m_Layer: 5
m_Name: TutorialStuff
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1163302947
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1163302946}
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: 1627361072}
m_Father: {fileID: 1407271059}
m_RootOrder: 6
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: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1222077192
GameObject:
m_ObjectHideFlags: 0
......@@ -2056,7 +2092,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 54.998962, y: -89.570015}
m_AnchoredPosition: {x: 54.9989, y: -89.570015}
m_SizeDelta: {x: -130, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1315511371
......@@ -2239,6 +2275,7 @@ RectTransform:
- {fileID: 100312134}
- {fileID: 643606377}
- {fileID: 744014528}
- {fileID: 1163302947}
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -2563,6 +2600,75 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &1627361071
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1627361072}
- component: {fileID: 1627361074}
- component: {fileID: 1627361073}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1627361072
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1627361071}
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: 1163302947}
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: -283, y: 61}
m_SizeDelta: {x: 100, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1627361073
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1627361071}
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: 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_Sprite: {fileID: 21300000, guid: cfe9ef8fa4ea64a7baf0d1abbda774b3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &1627361074
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1627361071}
m_CullTransparentMesh: 0
--- !u!1 &1666194995
GameObject:
m_ObjectHideFlags: 0
......@@ -3191,7 +3297,7 @@ MonoBehaviour:
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 0
m_FillAmount: 1
m_FillAmount: 0
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &2133793785
......
......@@ -73,11 +73,6 @@ public class CharacterInteractions : MonoBehaviour {
}
} else {//if the player is currently interacting
if (!DaytimeManager.enteringName) {//conversing
if ((Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.E)))
{
converse();
}
if (Input.GetKeyDown(KeyCode.Alpha1))
{
ButtonPress(1);
......@@ -162,7 +157,8 @@ public class CharacterInteractions : MonoBehaviour {
playerResponses[i].GetComponent<RectTransform>().localPosition = newPos;
playerResponses[i].gameObject.SetActive(true);
playerResponses[i].GetComponentInChildren<Text>().text = replies[i];
playerResponses[i].GetComponentInChildren<Text>().text = "(" + (i + 1) + ") " + replies[i];
} else {
playerResponses[i].gameObject.SetActive(false);
}
......@@ -184,21 +180,21 @@ public class CharacterInteractions : MonoBehaviour {
}
public void ButtonPress(int buttonNum) {
if (interacting) {
//stage 1, ahava asks player for name
if (characterScript.getName() == "Ahava" && GameManager.ConversationStage == 1)
{
askPlayerForName();
setText(speechBox, characterScript.converse(), Mathf.Infinity, characterScript.getResponses());
}
else
{
setText(speechBox, characterScript.converse(), Mathf.Infinity, characterScript.getResponses());
}
converse();
}
}
private void converse(){
//stage 1, ahava asks player for name
if (characterScript.getName() == "Ahava" && GameManager.ConversationStage == 1)
{
askPlayerForName();
setText(speechBox, characterScript.converse(), Mathf.Infinity, characterScript.getResponses());
}
else
{
setText(speechBox, characterScript.converse(), Mathf.Infinity, characterScript.getResponses());
}
}
public void animationStuff() {
......@@ -215,9 +211,6 @@ public class CharacterInteractions : MonoBehaviour {
DaytimeManager.enteringName = true;
inputName.gameObject.SetActive(true);
inputName.ActivateInputField();
//string nameQuestion = "What Is Your Name1";
//string[] nameResponse = new string[] { "okay" };
//setText(speechBox, nameQuestion, Mathf.Infinity, nameResponse);
return true;
}
return false;
......
......@@ -12,9 +12,13 @@ public class PieTutorial : MonoBehaviour {
public GameObject simon;
public SimonSpeech speech;
public Button button;
public Image powerPointer;
public Image powerBar;
private int state;
public static bool canThrow;
private void Start() {
GameManager.SimonTutorial = true;
dialogueBox.SetActive(false);
......@@ -22,14 +26,29 @@ public class PieTutorial : MonoBehaviour {
speech.GreetingMessage();
SimonText.text = speech.converse();
StartCoroutine(noticePlayer());
powerPointer.gameObject.SetActive(false);
}
private void Update() {
if(Input.GetKeyDown(KeyCode.Space) && GameManager.TutorialState == 1) {
progress();
}
if (Input.GetKey(KeyCode.Space) && GameManager.TutorialState == 2)
{
if(powerBar.fillAmount > 0.5){
canThrow = true;
SimonText.text = "GRR (Great! Now release it to fire the pie)";
}
}
if (Input.GetKeyUp(KeyCode.Space) && GameManager.TutorialState == 2){
progress();
if (powerBar.fillAmount > 0.5 || canThrow)
{
progress();
powerPointer.gameObject.SetActive(false);
}else{
SimonText.text = "Grr (No you have to HOLD DOWN spaceBar to change power)";
}
}
}
......@@ -56,6 +75,7 @@ public class PieTutorial : MonoBehaviour {
GameManager.TutorialState = 1;
} else if (state == 4) {
//relese space
powerPointer.gameObject.SetActive(true);
GameManager.TutorialState = 2;
}else if(state == 5) {
GameManager.TutorialState = 3;
......
......@@ -52,7 +52,7 @@ public class throwManager : MonoBehaviour {
}
void manageThrow() {
if (Input.GetKeyUp("space") && PieManager.pieCount > 0) {
if (Input.GetKeyUp("space") && PieManager.pieCount > 0 && PieTutorial.canThrow) {
//create pie object and set its power to the powerBars fill
GameObject pie = Instantiate(piePrefab, pieSpawn.position, Quaternion.Euler(new Vector3(0, 0, (1 - angleMeter.fillAmount) * -90)));
pie.GetComponent<Pie>().force = powerBar.fillAmount;
......
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