protected void Awake() { if (cldr == null) { Debug.Log("Add a collider", this); } if (damageable == null) { damageable = GetComponent <Damageable>(); } if (damager == null) { damager = GetComponent <Damager>(); } if (obstComp == null) { obstComp = GetComponent <ObstacleComponent>(); } if (pusher == null) { pusher = GetComponent <Pusher>(); } if (rb == null) { rb = GetComponent <Rigidbody2D>(); } initialPos = this.transform.localPosition; }
private void Awake() { if (component == null) { component = GetComponent <ObstacleComponent>(); Debug.Log("Forgot to reference"); } }
private void Awake() { if (component == null) { component = GetComponent <ObstacleComponent>(); Debug.Log("Forgot to reference", this); } if (pickuppable == null) { pickuppable = GetComponent <Pickuppable>(); Debug.Log("Forgot to reference", this); } }
private void Awake() { if (obstComp == null) { obstComp = GetComponent <ObstacleComponent>(); } if (triggerable == null) { triggerable = GetComponent <Triggerable>(); } obstComp.OnSetup += Setup; Setup(); }
protected virtual void Awake() { if (obstComp == null) { obstComp = GetComponent <ObstacleComponent>(); } if (bumpTrigger == null) { bumpTrigger = GetComponent <TagTrigger>(); } obstComp.OnSetup += Setup; isActive = true; anim.SetBool("IsActive", true); }
private void Awake() { if (!gameObject.tag.Equals(Meta_Tags.interactable)) { gameObject.tag = Meta_Tags.interactable; Debug.Log("Forgot to tag", this); } if (component == null) { component = GetComponent <ObstacleComponent>(); Debug.Log("Forgot to reference", this); } component.OnSetup += Setup; }
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 (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; }
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; }