void DoFacing() { Vector3 facingVector = player.transform.position - this.transform.position; if (Mathf.Abs(facingVector.x) > Mathf.Abs(facingVector.y)) { if (facingVector.x > 0) { facing = EntityFacing.Right; } else { facing = EntityFacing.Left; } } else { if (facingVector.y > 0) { facing = EntityFacing.Up; } else { facing = EntityFacing.Down; } } animator.Play("skeletonwalk" + facing.ToString().ToLower()); }
void DoFacing() { Vector3 facingVector = player.transform.position - this.transform.position; EntityFacing facing = Facing.DirectionToFacing(facingVector); animator.Play("ArcherWalk" + facing.ToString()); }
void DoFacing() { animator.Play("OctorokWalk" + facing.ToString()); }