コード例 #1
0
ファイル: Church.cs プロジェクト: Niernen2033/MJ-RK
        private void Awake()
        {
            this.ShopInventory = shopInventory.GetComponent <ShopInventory>();

            this.shop.gameObject.GetComponent <Button>().onClick.AddListener(() => this.OpenChurchShop());

            this.openBuildingCallback = this.gameObject.GetComponentInParent <City>().OpenBuilding;
        }
コード例 #2
0
ファイル: BlackSmith.cs プロジェクト: Niernen2033/MJ-RK
        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;
        }
コード例 #3
0
ファイル: House.cs プロジェクト: Niernen2033/MJ-RK
 public void Awake()
 {
     this.openBuildingCallback = GetComponentInParent <City>().OpenBuilding;
 }