void Update() { /*if (Input.GetKeyDown (KeyCode.I)) * { * /active = !active; * * if (!active) * { * player.GetComponent<RigidbodyFirstPersonController> ().enabled = true; * } * else * { * player.GetComponent<RigidbodyFirstPersonController> ().enabled = false; * Cursor.lockState = CursorLockMode.None; * Cursor.visible = true; * } * GetComponent<Canvas>().enabled = active; * * }*/ if (Input.GetKeyDown(KeyCode.A)) { if (slot [0] != 0) { UtilObj1(); ui.CreateWall(); } } if (Input.GetKeyDown(KeyCode.E)) { if (slot [1] != 0) { UtilObj2(); ui.speedBonus(); } } if (Input.GetKeyDown(KeyCode.R)) { if (slot [2] != 0) { UtilObj3(); } } }