private void Awake() { if (Instance == null) { Instance = this; } else { GameObject.Destroy(this); } }
public void OnTriggerEnter(Collider other) { if (TapSwipe.attacking) { other.gameObject.GetComponentInParent <Disk>().die(); } else if (other.tag == "Soul") { soul.Play(); Destroy(other); } else if (other.tag == "Enemy") { die = true; LevelMovement.Stop(); death.Play(); } }
// Use this for initialization void Start() { levelRef = FindObjectOfType <LevelMovement>(); }