protected override void Awake() { base.Awake(); if (rewardable == null) { rewardable = GetComponent <Rewardable>(); } }
private void Awake() { if (component == null) { component = GetComponent <ObstacleComponent>(); Debug.Log("Forgot to reference", this); } if (rewardable == null) { rewardable = GetComponent <Rewardable>(); Debug.Log("Forgot to reference", this); } if (unlockable == null) { unlockable = GetComponent <Unlockable>(); Debug.Log("Forgot to reference", this); } component.OnSetup += Setup; }