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
756 B

using UnityEngine;
using System.Collections;
public class playerId : MonoBehaviour {
public bool idVanish = true;
// 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) {
transform.position = new Vector3 (transform.position.x, -100, transform.position.z);
idVanish = false;
Debug.Log ("player ID true");
}
}
if (Input.GetKeyDown (KeyCode.Backspace) && idVanish == false) {
transform.position = new Vector3 (transform.position.x, 100, transform.position.z);
idVanish = true;
}
}
}