//Activates the appropriate collider and animation ID/Integer private void ActivateCorrespondingCollider(FourDirections dir) { switch (dir) { case FourDirections.North: Debug.Log("RIGHT UP"); swordColliderUp.EnableCollider(); break; case FourDirections.East: Debug.Log("UP LEFT"); swordColliderRight.EnableCollider(); break; case FourDirections.South: Debug.Log("LEFT DOWN"); swordCollider.EnableCollider(); break; case FourDirections.West: Debug.Log("DOWN RIGHT"); swordColliderLeft.EnableCollider(); break; } }
public void ActivateCorrespondingCollider(FourDirections dir) { switch (dir) { case FourDirections.North: //Debug.Log ("North"); //Activate RightUp collider and animation colliderUp.EnableCollider(); break; case FourDirections.East: //Debug.Log ("East"); colliderRight.EnableCollider(); break; case FourDirections.South: //Debug.Log ("South"); colliderDown.EnableCollider(); break; case FourDirections.West: //Debug.Log ("West"); colliderLeft.EnableCollider(); break; } }
//Determines what direction to face when attacking and enables the corresponding collider private void ActivateCorrespondingCollider(FourDirections direction) { switch (direction) { case FourDirections.North: Debug.Log("North"); swordColliderUp.EnableCollider(); break; case FourDirections.East: Debug.Log("East"); swordColliderRight.EnableCollider(); break; case FourDirections.South: Debug.Log("South"); swordCollider.EnableCollider(); break; case FourDirections.West: Debug.Log("West"); swordColliderLeft.EnableCollider(); break; } }