Ejemplo n.º 1
0
    private void Awake()
    {
        playButton = GameObject.FindGameObjectWithTag("uiPlayButton").GetComponent <Button>();
        if (playButton == null)
        {
            Debug.Log("Menu Button couldnt get a reference to the Play Button");
        }

        fpPanel = GameObject.FindGameObjectWithTag("uiFinalPlayPanel").GetComponent <FinalPlayPanel>();
        if (fpPanel == null)
        {
            Debug.Log("Menu button couldnt get a reference to the Final Play Panel Script.");
        }

        daScript = GameObject.FindGameObjectWithTag("uiDownArrow").GetComponent <DownArrowScript>();
        if (daScript == null)
        {
            Debug.Log("Menu button script couldnt get reference to the down arrow script.");
        }

        charSelectSub = GameObject.FindGameObjectWithTag("uiCharSubPanel");
        if (charSelectSub == null)
        {
            Debug.Log("Menu Button Script couldnt get a reference to the ui Char Select Sub Panel.");
        }
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        charSelectHighLight = GameObject.FindGameObjectWithTag("uiCharHighLight");
        if (charSelectHighLight == null)
        {
            Debug.Log("Couldnt get reference to the Character buttons Char Select HighLight Panel");
        }

        charName = GetComponentInChildren <Text>();
        if (charName == null)
        {
            Debug.Log("Character button script could not get a reference to its own Text component.");
        }

        charCost = GameObject.FindGameObjectWithTag("uiCharCostField").GetComponent <Text>();
        if (charCost == null)
        {
            Debug.Log("Character button script could not get a reference to the Character Cost Text component.");
        }

        charJump = GameObject.FindGameObjectWithTag("uiJump").GetComponent <Text>();
        if (charJump == null)
        {
            Debug.Log("Character button script could not get a reference to the Character Jump Text component.");
        }

        charDist = GameObject.FindGameObjectWithTag("uiDistance").GetComponent <Text>();
        if (charDist == null)
        {
            Debug.Log("Character button script could not get a reference to the Character Dist Text component.");
        }

        daScript = GameObject.FindGameObjectWithTag("uiDownArrow").GetComponent <DownArrowScript>();
        if (daScript == null)
        {
            Debug.Log("Character button script couldnt get reference to the down arrow script.");
        }

        saveOneShot = false;
    }