|
@ -2,15 +2,12 @@ |
|
|
using System.Collections; |
|
|
using System.Collections; |
|
|
|
|
|
|
|
|
public class playerId : MonoBehaviour { |
|
|
public class playerId : MonoBehaviour { |
|
|
public bool idVanish = false; |
|
|
|
|
|
public GameObject p1; |
|
|
|
|
|
public GameObject p2; |
|
|
|
|
|
public GameObject p3; |
|
|
|
|
|
public GameObject p4; |
|
|
|
|
|
|
|
|
public bool idVanish = true; |
|
|
|
|
|
public GameObject idTag; |
|
|
|
|
|
|
|
|
// Use this for initialization
|
|
|
// Use this for initialization
|
|
|
void Start () { |
|
|
void Start () { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
// Update is called once per frame
|
|
@ -20,23 +17,14 @@ public class playerId : MonoBehaviour { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Input.GetKeyDown (KeyCode.Backspace)) { |
|
|
if (Input.GetKeyDown (KeyCode.Backspace)) { |
|
|
idVanish = true; |
|
|
|
|
|
if (idVanish) { |
|
|
|
|
|
p1.gameObject.SetActive (false); |
|
|
|
|
|
p2.gameObject.SetActive (false); |
|
|
|
|
|
p3.SetActive (false); |
|
|
|
|
|
p4.SetActive (false); |
|
|
|
|
|
|
|
|
idVanish = !idVanish; |
|
|
|
|
|
|
|
|
|
|
|
idTag.gameObject.SetActive (idVanish); |
|
|
|
|
|
|
|
|
Debug.Log ("player ID false"); |
|
|
Debug.Log ("player ID false"); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (Input.GetKeyDown (KeyCode.Backspace) && idVanish == true) { |
|
|
|
|
|
p1.SetActive (true); |
|
|
|
|
|
p2.SetActive (true); |
|
|
|
|
|
p3.SetActive (true); |
|
|
|
|
|
p4.SetActive (true); |
|
|
|
|
|
idVanish = false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|