예제 #1
0
    void Start()
    {
        scene = SceneManager_Base.Instance;

        myGUITexture    = GetComponent <GUITexture>();
        originalTexture = (Texture2D)myGUITexture.texture;
    }
예제 #2
0
    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;
    }
예제 #3
0
    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;
    }
예제 #4
0
    // ----------------------------------------------------------------------------------------
    // 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;
    }
예제 #5
0
 void Start()
 {
     myGUITexture = GetComponent <GUITexture>();
     scene        = SceneManager_Base.Instance;
 }
예제 #6
0
 void Awake()
 {
     scene = SceneManager_Base.Instance;
 }