Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Flip()
- {
- // Switch the way the player is labelled as facing.
- m_FacingRight = !m_FacingRight;
- // Multiply the player's x local scale by -1.
- Vector3 theScale = transform.localScale;
- theScale.x *= -1;
- transform.localScale = theScale;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement