|
|
- using UnityEngine;
- using System.Collections;
-
- public class playerId : MonoBehaviour {
- public bool idVanish = false;
- public GameObject p1;
- public GameObject p2;
- public GameObject p3;
- public GameObject p4;
-
- // Use this for initialization
- void Start () {
-
- }
-
- // Update is called once per frame
- void Update () {
-
- transform.eulerAngles = new Vector3 (transform.eulerAngles.x, 180, transform.eulerAngles.z);
-
-
- if (Input.GetKeyDown (KeyCode.Backspace)) {
- idVanish = true;
- if (idVanish) {
- p1.gameObject.SetActive (false);
- p2.gameObject.SetActive (false);
- p3.SetActive (false);
- p4.SetActive (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;
- }
-
-
-
- }
- }
|