Exemple #1
0
    void Start()
    {
        _bankRepository = new BankRepository();
        _bankRepository.Initialize();

        _bankInteractor = new BankInteractor(_bankRepository);
        _bankInteractor.Initialize();

        Debug.Log(_bankInteractor.Coins);
    }
        private void Awake()
        {
            this.borderline = GetComponent <Borderline>();
            this.bank       = Game.GetInteractor <BankInteractor>();

            if (Random.value > 1)
            {
                this.startDirection = true;
            }
        }
Exemple #3
0
        protected void Initialize(IUpgradable interactor)
        {
            this.bank = Game.GetInteractor <BankInteractor>();

            this.upgradeCostMap = new Dictionary <int, int>()
            {
                [0] = this.upgradeObject.costLevelOne,
                [1] = this.upgradeObject.costLevelTwo,
                [2] = this.upgradeObject.costLevelThree,
                [3] = this.upgradeObject.costLevelFour,
                [4] = this.upgradeObject.costLevelFive,
                [5] = this.upgradeObject.costLevelSix,
                [6] = this.upgradeObject.costLevelSeven,
                [7] = this.upgradeObject.costLevelEight,
                [8] = this.upgradeObject.costLevelNine,
                [9] = this.upgradeObject.costLevelTen,
            };

            SetUpButton(interactor.Level);
        }
Exemple #4
0
 private void OnEnable()
 {
     bank = Game.GetInteractor <BankInteractor>();
     bank.MoneyAmountChanged += UpdateText;
 }