void AIOrder(buildType type) { buildQueue temp = new buildQueue(type, buildTime); buildList.Add(temp); queueLength = buildList.Count; }
private void Awake() { Xaxis = this.transform.position.x; Yaxis = this.transform.position.y; MapGenerator = GameObject.Find("MapGenerator"); MapScript = (MapGeneratorScript)MapGenerator.GetComponent(typeof(MapGeneratorScript)); QueueScript = (buildQueue)MapGenerator.GetComponent(typeof(buildQueue)); GameManager = (gameManager)MapGenerator.GetComponent(typeof(gameManager)); }
void newOrder(GameObject factory, buildType type) { //Debug.Log ("Stage 1"); if (rManager.resource[playerID] > type.cost) { if (factory == this.gameObject) { check = true; if (buildList.Count < 12 && check == true) { buildQueue temp = new buildQueue(type, buildTime); buildList.Add(temp); eventManager.Spend(type.cost, playerID); eventManager.FactoryConfirm(factory, type); check = false; queueLength = buildList.Count; } } } }
void Start() { BuildQueue = MapGenerator.GetComponent <buildQueue>(); }