Defines the basic GUI information on the bottom of the screen Basically, shows the name of the object where the mouse is over
Inheritance: MonoBehaviour
    /*
     * ===========================================================================================================
     * UNITY STUFF
     * ===========================================================================================================
     */
    //
    void Awake()
    {
        // Gets the script of the GUI stuff
        infoPanel = gameObject.GetComponent<GUIBottomMenu>();

        if(infoPanel == null) {

            // DEBUG
            Debug.LogError("GUIBottomRuler not found in this object.");
        }

        if(cursorObject == null) {

            // DEBUG
            Debug.LogError("CursorObject not defined.");
        }

        GUIScript = GameObject.Find("HUD-Objects").GetComponent<GUIControl>();
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        bottomMenu = GetComponent<GUIBottomMenu>();
        if(!bottomMenu) {

            // DEBUG
            Debug.LogError("Bottom menu object not found!");
        }

        player = playerObject.GetComponent<CPlayer>();
        if(!player) {

            // DEBUG
            Debug.LogError("Player object not found!");
        }

        fTaxaConsumoOxigenio = 1.0f;
        fTaxaExtract = 1.0f;
        fTaxaFabrica = 1.0f;

        GetCurrentUnitsInScene();

        mouseInputScript = gameObject.GetComponent<MouseWorldPosition>();
        if(!mouseInputScript) {

            // DEBUG
            Debug.LogError("Cannot find the MouseWorldPosition component. Please check.");
        }

        questManager = gameObject.GetComponent<QuestManager>();
        if(!questManager) {

            // DEBUG
            Debug.LogError("Cannot find the QuestManager component. Please check.");
        }

        //Instantiate(GameObject.("Monkey"), new Vector3(79.07609f,33.39249f,13.41692f), Quaternion.identity);

        // Get all the monkeys in the scene and assign their objects to some variables, so we have shortcuts to them
        GetMonkeysObjects();
    }