Guest User

Update function

a guest
Jun 12th, 2019
1,286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. void Update()
  2. {
  3.     if (flipXValue < 1 && EventSystem.current.currentSelectedGameObject != null)
  4.     {
  5.         GameObject tileToFlip = EventSystem.current.currentSelectedGameObject;
  6.         flipXValue += 0.2f;
  7.         tileToFlip.transform.localScale = new Vector3(flipXValue, tileToFlip.transform.localScale.y, tileToFlip.transform.localScale.z);
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment