private float GetRotation() { float z = 0f; switch (OwnerMobileBehaviour.GetLastDirectionIndex()) { case 0: //Debug.Log("asd"); z = -90f; break; case 1: z = 0f; break; case 2: z = 90f; break; case 3: z = 180f; break; } return(z); }
private Vector2 GetDirection() { switch (OwnerMobileBehaviour.GetLastDirectionIndex()) { case 0: return(Vector2.right); case 1: return(Vector2.up); case 2: return(Vector2.left); case 3: return(Vector2.down); } return(Vector2.right); }