void Awake() { owner = "N/A"; lands = new List <Environment>(); gameController = GameObject.Find("GameController").GetComponent <GameController>(); position = new Vector2(); armyTable = new Hashtable(); army = Resources.Load("Prefabs/Army") as GameObject; GameObject uiBankObject = GameObject.Find("UIBank") as GameObject; uiBank = uiBankObject.GetComponent <UIBank> (); storedArmies = new List <Army> (); armies = new List <Army>(); type = "city"; // pick a random color float R = Random.Range(.4f, .9f); float G = Random.Range(.4f, .9f); float B = Random.Range(.4f, .9f); Color newColor = new Color(R, G, B, 1.0f); // apply it on current object's material GetComponent <Renderer>().material.color = newColor; NameWizard nameWizard = GameObject.Find("NameWizard").GetComponent <NameWizard>(); name = nameWizard.GenerateCityName(); leader = new Character(); population = Random.Range(10000, 15000); muns = population / 3; food = population + (population / 3); }
// Use this for initialization void Awake() { GameObject uiBankObject = GameObject.Find("UIBank") as GameObject; uiBank = uiBankObject.GetComponent <UIBank>(); isOccupied = false; }
// Use this for initialization void Start() { CreateWorld(); uiBank = GameObject.Find("UIBank").GetComponent <UIBank> (); uiBank.OpenInfoPanel(); gameReady = true; grid [(int)playerCity.GetComponent <City> ().position.x, (int)playerCity.GetComponent <City> ().position.y].GetComponent <Tile> ().SelectTile(); uiBank.munText.text = playerCity.GetComponent <City>().muns.ToString(); uiBank.foodText.text = playerCity.GetComponent <City>().food.ToString(); }
void Awake() { coords = new List <Vector2> (); uiBank = GameObject.Find("UIBank").GetComponent <UIBank> (); environmentBank = GameObject.Find("EnvironmentBank").GetComponent <EnvironmentBank>(); daysLeft = 365; timeOfDay = TimeOfDay.Midnight; playerParty = playerPartyObject.GetComponent <Party>(); //AIParties = new List<GameObject> (); tileGrid = new GameObject[0]; environmentGrid = new GameObject[0]; ChangeLevel(LevelType.Fields); }
// Use this for initialization void Awake() { uiBank = GameObject.Find("UIBank").GetComponent <UIBank> (); playerParty = playerPartyObject.GetComponent <Party> (); }
// Use this for initialization void Start() { uiBank = GameObject.Find("UIBank").GetComponent <UIBank> (); }
void Awake() { GameObject u = GameObject.Find("UIBank") as GameObject; uiBank = u.GetComponent <UIBank> (); }
void Awake() { uiBank = GameObject.Find("UIBank").GetComponent <UIBank>(); gameController = GameObject.Find("GameController").GetComponent <GameController>(); }