You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
612 B

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. using UnityEngine;
  2. using System.Collections;
  3. public class playerId : MonoBehaviour {
  4. public bool idVanish = false;
  5. public GameObject idTag;
  6. public bool idVanishDisp = true;
  7. // Use this for initialization
  8. void Start () {
  9. }
  10. // Update is called once per frame
  11. void Update () {
  12. transform.eulerAngles = new Vector3 (transform.eulerAngles.x, 180, transform.eulerAngles.z);
  13. if (Input.GetKeyDown (KeyCode.Backspace) || idVanish != idVanishDisp) {
  14. idVanish = !idVanish;
  15. idVanishDisp = idVanish;
  16. idTag.gameObject.SetActive (idVanish);
  17. Debug.Log ("player ID false");
  18. }
  19. }
  20. }