/* * =========================================================================================================== * 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>(); }
// 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(); }