void OnCollisionStay2D(Collision2D collision) { StatusType = CStatusType.Walk; if (collision.gameObject.tag == WalkBumperTag) { StatusType = CStatusType.Attack; collisionTarget = collision.gameObject; } }
void OnTriggerStay2D(Collider2D collider) { //StatusType = CStatusType.Walk; if (collider.gameObject.tag == WalkBumperTag) { StatusType = CStatusType.Attack; collisionTarget = collider.gameObject; } }
void LateUpdate() { if (TargetHealth.CurrentValue > 0 && PlayerType == CPlayerType.Zombie) { if (collisionTarget == null) { StatusType = CStatusType.Walk; TargetAnimator.Play(WalkAnimation); } } }
void OnCollisionEnter2D(Collision2D collision) { StatusType = CStatusType.Walk; if (collision.gameObject.tag == WalkBumperTag) { StatusType = CStatusType.Attack; collisionTarget = collision.gameObject; } if (collision.gameObject.tag == AttackBumperTag) { TargetHealth.CurrentValue -= 5; GetHitAnimationPlay(); } }
void AlwaysWalk() { StatusType = CStatusType.Walk; }