void Start() { scene = SceneManager_Base.Instance; myGUITexture = GetComponent <GUITexture>(); originalTexture = (Texture2D)myGUITexture.texture; }
void Awake() { boardManager = (BoardManager)FindObjectOfType(typeof(BoardManager)); if (boardManager == null) { boardManagerSquare = (BoardManagerSquare)FindObjectOfType(typeof(BoardManagerSquare)); } if (boardManagerSquare == null) { boardManagerEuropean = (BoardManagerEuropean)FindObjectOfType(typeof(BoardManagerEuropean)); } scene = SceneManager_Base.Instance; data = PersistentData.Instance; }
void Start() { scene = SceneManager_Base.Instance; myGUITexture = GetComponent <GUITexture>(); myTransform = myGUITexture.transform; // set up the proper button aspect float aspect = Camera.main.aspect; Vector3 startingScale = myTransform.localScale; startingScale.y = startingScale.x * aspect; myTransform.localScale = startingScale; hoverVector.x = hoverScale; hoverVector.y = hoverScale * aspect; }
// ---------------------------------------------------------------------------------------- // Name : Awake // Desc : Called when button object is first created to cache frequently used // components and calculate the starting and offset positions of the button. // ---------------------------------------------------------------------------------------- void Awake() { // Get the Collider and the scene's Main Camera MyCollider = collider; MainCamera = Camera.main; MyGameObject = gameObject; MyTransform = transform; myTextMesh = GetComponent <TextMesh>(); scene = SceneManager_Base.Instance; originalColor = myTextMesh.color; // Set the position to start and the position to move to OriginalPosition = MyTransform.position; OffsetPosition = OriginalPosition + new Vector3(0.0f, 0.0f, ZSelectOffset); // Current position will start at the original position CurrentPosition = OriginalPosition; }
void Start() { myGUITexture = GetComponent <GUITexture>(); scene = SceneManager_Base.Instance; }
void Awake() { scene = SceneManager_Base.Instance; }