Browse Source

hit boxes

master
unknown 9 years ago
parent
commit
d53cb55b13
3 changed files with 9 additions and 21 deletions
  1. BIN
      playable/Assets/Scenes/Level1.unity
  2. BIN
      playable/Assets/Scenes/Level2.unity
  3. +9
    -21
      playable/Assets/Scripts/playerId.cs

BIN
playable/Assets/Scenes/Level1.unity View File


BIN
playable/Assets/Scenes/Level2.unity View File


+ 9
- 21
playable/Assets/Scripts/playerId.cs View File

@ -2,15 +2,12 @@
using System.Collections; using System.Collections;
public class playerId : MonoBehaviour { public class playerId : MonoBehaviour {
public bool idVanish = false;
public GameObject p1;
public GameObject p2;
public GameObject p3;
public GameObject p4;
public bool idVanish = true;
public GameObject idTag;
// Use this for initialization // Use this for initialization
void Start () { void Start () {
} }
// Update is called once per frame // Update is called once per frame
@ -20,23 +17,14 @@ public class playerId : MonoBehaviour {
if (Input.GetKeyDown (KeyCode.Backspace)) { if (Input.GetKeyDown (KeyCode.Backspace)) {
idVanish = true;
if (idVanish) {
p1.gameObject.SetActive (false);
p2.gameObject.SetActive (false);
p3.SetActive (false);
p4.SetActive (false);
idVanish = !idVanish;
idTag.gameObject.SetActive (idVanish);
Debug.Log ("player ID 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;
}
} }

Loading…
Cancel
Save