private void Awake() { this.ShopInventory = shopInventory.GetComponent <ShopInventory>(); this.shop.gameObject.GetComponent <Button>().onClick.AddListener(() => this.OpenChurchShop()); this.openBuildingCallback = this.gameObject.GetComponentInParent <City>().OpenBuilding; }
private void Awake() { this.ShopInventory = shopInventory.GetComponent <ShopInventory>(); this.UpgradeInventory = this.upgradeInventory.GetComponent <UpgradeInventory>(); this.RepairInventory = this.repairInventory.GetComponent <RepairInventory>(); this.anvil.gameObject.GetComponent <Button>().onClick.AddListener(() => this.OpenBlackSmithAnvil()); this.shop.gameObject.GetComponent <Button>().onClick.AddListener(() => this.OpenBlackSmithShop()); this.wheel.gameObject.GetComponent <Button>().onClick.AddListener(() => this.OpenBlackSmithWheel()); this.openBuildingCallback = this.gameObject.GetComponentInParent <City>().OpenBuilding; }
public void Awake() { this.openBuildingCallback = GetComponentInParent <City>().OpenBuilding; }