|
@ -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; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|