Browse Source

Menu Controll with controller

master
Joshua Reason 9 years ago
parent
commit
7fc54a9a3b
12 changed files with 20 additions and 21 deletions
  1. BIN
      GS1PinataSmackdown_Submission.pdf
  2. +1
    -1
      Pinata_Data/PlayerConnectionConfigFile
  3. BIN
      Pinata_Data/level0
  4. BIN
      Pinata_Data/level1
  5. BIN
      Pinata_Data/mainData
  6. +0
    -18
      Pinata_Data/output_log.txt
  7. BIN
      Pinata_Data/sharedassets0.assets
  8. BIN
      Pinata_Data/sharedassets1.assets
  9. BIN
      Pinata_Data/sharedassets2.assets
  10. BIN
      playable/Assets/Scenes/Menu_Scene.unity
  11. +18
    -1
      playable/Assets/Scripts/menuContrller.cs
  12. +1
    -1
      playable/Assets/Scripts/playerController.cs

BIN
GS1PinataSmackdown_Submission.pdf View File


+ 1
- 1
Pinata_Data/PlayerConnectionConfigFile View File

@ -1 +1 @@
listen 3396129451 0 0
listen 1859183214 0 0

BIN
Pinata_Data/level0 View File


BIN
Pinata_Data/level1 View File


BIN
Pinata_Data/mainData View File


+ 0
- 18
Pinata_Data/output_log.txt View File

@ -1,18 +0,0 @@
Initialize engine version: 4.6.4f1 (99f88340878d)
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 11.0 [level 11.0]
Renderer: Intel(R) HD Graphics Family (ID=0xa16)
Vendor: Intel
VRAM: 896 MB
Begin MonoManager ReloadAssembly
Platform assembly: C:\Users\Joshua\Documents\pi-ata-smackdown\Pinata_Data\Managed\UnityEngine.dll (this message is harmless)
Loading C:\Users\Joshua\Documents\pi-ata-smackdown\Pinata_Data\Managed\UnityEngine.dll into Unity Child Domain
Platform assembly: C:\Users\Joshua\Documents\pi-ata-smackdown\Pinata_Data\Managed\Assembly-CSharp.dll (this message is harmless)
Loading C:\Users\Joshua\Documents\pi-ata-smackdown\Pinata_Data\Managed\Assembly-CSharp.dll into Unity Child Domain
Platform assembly: C:\Users\Joshua\Documents\pi-ata-smackdown\Pinata_Data\Managed\UnityEngine.UI.dll (this message is harmless)
Loading C:\Users\Joshua\Documents\pi-ata-smackdown\Pinata_Data\Managed\UnityEngine.UI.dll into Unity Child Domain
- Completed reload, in 0.203 seconds
desktop: 2160x1440 59Hz; virtual: 2160x1440 at 0,0
<RI> Initializing input.
<RI> Input initialized.

BIN
Pinata_Data/sharedassets0.assets View File


BIN
Pinata_Data/sharedassets1.assets View File


BIN
Pinata_Data/sharedassets2.assets View File


BIN
playable/Assets/Scenes/Menu_Scene.unity View File


+ 18
- 1
playable/Assets/Scripts/menuContrller.cs View File

@ -56,9 +56,22 @@ public class menuContrller : MonoBehaviour {
if (Input.GetAxisRaw ("Vertical_P4") == 1) { if (Input.GetAxisRaw ("Vertical_P4") == 1) {
p4Enabled = true; p4Enabled = true;
btn_4player.GetComponent<Image> ().color = Color.green; btn_4player.GetComponent<Image> ().color = Color.green;
} }
if (Input.GetButtonDown ("start") && menu.activeSelf)
panelSelect ("levelSelect");
if (Input.GetButtonDown ("start") && levelSelect.activeSelf) {
int tempRand = Mathf.RoundToInt(Random.Range (1,3));
if (tempRand == 2)
levelStart("Level1");
else
levelStart("Level2");
}
} }
@ -159,4 +172,8 @@ public class menuContrller : MonoBehaviour {
control.confetti = Mathf.RoundToInt (confetti); control.confetti = Mathf.RoundToInt (confetti);
} }
public void exit(){
Application.Quit ();
}
} }

+ 1
- 1
playable/Assets/Scripts/playerController.cs View File

@ -95,7 +95,7 @@ public class playerController : MonoBehaviour {
gameOverDisplay.enabled = true; gameOverDisplay.enabled = true;
gameOverDisplay.text = ""+ gameObject.name + " Wins"; gameOverDisplay.text = ""+ gameObject.name + " Wins";
Time.timeScale = 0; Time.timeScale = 0;
if (Input.anyKeyDown){
if (Input.GetKeyDown("start")){
Time.timeScale = 1.0f; Time.timeScale = 1.0f;
Application.LoadLevel("Menu_Scene"); Application.LoadLevel("Menu_Scene");
} }

Loading…
Cancel
Save