Commit 1c57e1cb authored by mmaluschnig's avatar mmaluschnig
Browse files

enabled pause menu in mime, player can press 1234 to progress dialogue, player...

enabled pause menu in mime, player can press 1234 to progress dialogue, player gets lots of pies in tutorial
parent c7687dbd
<Properties StartupConfiguration="{67A4F128-F6AC-CD88-DA35-F29416A0792A}|">
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="Unity.Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/DaytimeScripts/CharacterInteractions.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/PieScripts/Pie.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" />
......@@ -9,10 +9,12 @@
<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="1" Column="1" />
<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="71" Column="81" />
<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" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
......
......@@ -2461,7 +2461,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}
......
......@@ -72,15 +72,30 @@ public class CharacterInteractions : MonoBehaviour {
}
}
} else {//if the player is currently interacting
if (!DaytimeManager.enteringName && (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.E))) {//conversing
//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());
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);
}
if (Input.GetKeyDown(KeyCode.Alpha2))
{
ButtonPress(2);
}
if (Input.GetKeyDown(KeyCode.Alpha3))
{
ButtonPress(3);
}
if (Input.GetKeyDown(KeyCode.Alpha4))
{
ButtonPress(4);
}
}
}
}
//deactivate the dialogue UI
......@@ -169,10 +184,23 @@ public class CharacterInteractions : MonoBehaviour {
}
public void ButtonPress(int buttonNum) {
if (interacting) {
setText(speechBox, characterScript.converse(), Mathf.Infinity, characterScript.getResponses());
//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());
}
}
}
private void converse(){
}
public void animationStuff() {
if (interacting) {
anim.SetBool("Talking", true);
......
......@@ -24,29 +24,35 @@ public class Pie : MonoBehaviour {
private void OnTriggerEnter2D(Collider2D collision)
{
if(collision.gameObject.tag != "Pie"){
PieManager.pieInScene = false;
PieManager.start = false;
if (!collided) {
if (!collision.GetComponent<PieTarget>()) {
gameObject.GetComponent<Rigidbody2D>().velocity = new Vector2(0, 0);
gameObject.GetComponent<Rigidbody2D>().gravityScale = 0;
Destroy(gameObject.GetComponent<Collider2D>());
} else if (collision.tag != "TargetHit") {
Destroy(GetComponent<Rigidbody2D>());
Destroy(GetComponent<Collider2D>());
collided = true;
StartCoroutine(splat());
//Destroy(gameObject);
//gameObject.GetComponent<Rigidbody2D>().velocity = new Vector2(0, 0);
//gameObject.GetComponent<Rigidbody2D>().gravityScale = 0;
//impact = collision.gameObject.GetComponent<Collider2D>();
//this.collided = true;
//relativePosition = impact.transform.position - gameObject.transform.position;
////print(relative);
//Destroy(gameObject.GetComponent<Collider2D>());
//Destroy(gameObject);
PieManager.start = false;
if (!collided)
{
if (!collision.GetComponent<PieTarget>())
{
gameObject.GetComponent<Rigidbody2D>().velocity = new Vector2(0, 0);
gameObject.GetComponent<Rigidbody2D>().gravityScale = 0;
Destroy(gameObject.GetComponent<Collider2D>());
}
else if (collision.tag != "TargetHit")
{
Destroy(GetComponent<Rigidbody2D>());
Destroy(GetComponent<Collider2D>());
collided = true;
StartCoroutine(splat());
//Destroy(gameObject);
//gameObject.GetComponent<Rigidbody2D>().velocity = new Vector2(0, 0);
//gameObject.GetComponent<Rigidbody2D>().gravityScale = 0;
//impact = collision.gameObject.GetComponent<Collider2D>();
//this.collided = true;
//relativePosition = impact.transform.position - gameObject.transform.position;
////print(relative);
//Destroy(gameObject.GetComponent<Collider2D>());
//Destroy(gameObject);
}
}
}
}
......
......@@ -116,7 +116,7 @@ public class PieManager : MonoBehaviour {
numTargets = 3;
pieCount = numTargets * 2;
pieCount = 1000;
print("Num targets: " + numTargets + ", Num pies: " + pieCount);
//targets[0].gameObject.SetActive(false);
//gameObject.transform.GetComponent<MovingTarget>().gameObject.SetActive(true);
......
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