void OnTriggerEnter(Collider other) { PCInputManager player = other.gameObject.GetComponent <PCInputManager>(); if (player != null) { AddValue(player); Destroy(this.gameObject); } }
void OnTriggerExit(Collider other) { PCInputManager pc = other.gameObject.GetComponent <PCInputManager>(); if (collidedWith != null && collidedWith.GetInstanceID().Equals(pc.GetInstanceID())) { collidedWith = null; spawner.AssignNewTarget(null); pulse = false; } }
void OnTriggerEnter(Collider other) { if (collidedWith != null) { return; } PCInputManager pc = other.gameObject.GetComponent <PCInputManager>(); if (pc == null) { return; } spawner.AssignNewTarget(pc.gameObject); pulse = true; }
public abstract void AddValue(PCInputManager gameObject);
public override void AddValue(PCInputManager player) { player.AddValue(value); }
// Use this for initialization void Start() { parent = this.gameObject.GetComponentInParent <PCInputManager>(); team = parent.team; }