Advertisement
infinite_ammo

MenuItem.cs

Apr 21st, 2012
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class MenuItem : MonoBehaviour
  5. {
  6.     public void ToggleHighlight(bool on)
  7.     {
  8.         Vector3 pos = transform.position;
  9.         if (on)
  10.         {
  11.             pos.z = -1.0f;
  12.         }
  13.         else
  14.         {
  15.             pos.z = 0.0f;
  16.         }
  17.         transform.position = pos;
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement