void Start() { allpoints = GameObject.Find("PointsController").GetComponent <AllPoints>(); if (allpoints == null) { Debug.Log("The game object -PointsController- not find in scene"); } moneyCollect = GameObject.Find("PointsController").GetComponent <MoneyCollect>(); if (moneyCollect == null) { Debug.Log("The game object -PointsController- not find in scene"); } pointsCollect = GameObject.Find("PointsController").GetComponent <PointsCollect>(); if (pointsCollect == null) { Debug.Log("The game object -PointsController- not find in scene"); } nightController = GetComponent <NightController>(); storageTime = Time.time + waitTime; storageTimeDay = Time.time + dayChange; }
private void Start() { shop = GetComponent <ShopManager>(); pointsCollect = GameObject.Find("PointsController").GetComponent <PointsCollect>(); technology = GameObject.Find("ItensBuyManager").GetComponent <TechnologyItens>(); science = GameObject.Find("ItensBuyManager").GetComponent <ScienceItens>(); army = GameObject.Find("ItensBuyManager").GetComponent <ArmyItens>(); food = GameObject.Find("ItensBuyManager").GetComponent <FoodItens>(); water = GameObject.Find("ItensBuyManager").GetComponent <WaterItens>(); population = GameObject.Find("ItensBuyManager").GetComponent <PopulationsItens>(); nature = GameObject.Find("ItensBuyManager").GetComponent <NatureItens>(); energy = GameObject.Find("ItensBuyManager").GetComponent <EnergyItens>(); }