private void Awake() { if (damageable == null) { damageable = GetComponent <Damageable>(); } if (pusher == null) { pusher = GetComponent <Pusher>(); } }
private void Awake() { if (component == null) { component = GetComponent <ObstacleComponent>(); Debug.Log("Forgot to reference", this); } if (damager == null) { damager = GetComponent <Damager>(); Debug.Log("Forgot to reference", this); } if (pusher == null) { pusher = GetComponent <Pusher>(); Debug.Log("Forgot to reference", this); } }
private void Awake() { if (damageable == null) { damageable = GetComponent <Damageable>(); } if (movable == null) { movable = GetComponent <Movable>(); } if (obstComp == null) { obstComp = GetComponent <ObstacleComponent>(); } if (pusher == null) { pusher = GetComponent <Pusher>(); } obstComp.OnSetup += Setup; }