Browse Source

playerid

master
unknown 9 years ago
parent
commit
d63976b2ba
4 changed files with 17 additions and 8 deletions
  1. BIN
      playable/Assets/Scenes/Level2.unity
  2. +0
    -0
      playable/Assets/Scripts/flameColor.cs
  3. +0
    -0
      playable/Assets/Scripts/flameColor.cs.meta
  4. +17
    -8
      playable/Assets/Scripts/playerId.cs

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


playable/Assets/flameColor.cs → playable/Assets/Scripts/flameColor.cs View File


playable/Assets/flameColor.cs.meta → playable/Assets/Scripts/flameColor.cs.meta View File


+ 17
- 8
playable/Assets/Scripts/playerId.cs View File

@ -2,8 +2,11 @@
using System.Collections; using System.Collections;
public class playerId : MonoBehaviour { public class playerId : MonoBehaviour {
public bool idVanish = true;
public bool idVanish = false;
public GameObject p1;
public GameObject p2;
public GameObject p3;
public GameObject p4;
// Use this for initialization // Use this for initialization
void Start () { void Start () {
@ -15,17 +18,23 @@ public class playerId : MonoBehaviour {
transform.eulerAngles = new Vector3 (transform.eulerAngles.x, 180, transform.eulerAngles.z); transform.eulerAngles = new Vector3 (transform.eulerAngles.x, 180, transform.eulerAngles.z);
if (Input.GetKeyDown (KeyCode.Backspace)) { if (Input.GetKeyDown (KeyCode.Backspace)) {
idVanish = true; idVanish = true;
if (idVanish) { if (idVanish) {
transform.position = new Vector3 (transform.position.x, -100, transform.position.z);
idVanish = false;
Debug.Log ("player ID true");
p1.SetActive (false);
p2.SetActive (false);
p3.SetActive (false);
p4.SetActive (false);
Debug.Log ("player ID false");
} }
} }
if (Input.GetKeyDown (KeyCode.Backspace) && idVanish == false) {
transform.position = new Vector3 (transform.position.x, 100, transform.position.z);
idVanish = true;
if (Input.GetKeyDown (KeyCode.Backspace) && idVanish == true) {
p1.SetActive (true);
p2.SetActive (true);
p3.SetActive (true);
p4.SetActive (true);
idVanish = false;
} }

Loading…
Cancel
Save