private void Start() { playerDailyReward = DataPlayer.GetModule <PlayerDailyReward>(); prefab = LoadResourceController.GetDailyRewardView(); dailyRewardCollection = LoadResourceController.GetDailyReward(); TimeManager.Ins.UpdateTime(UpdateView); }
public MainController(Transform placeForUi, ProfilePlayer profilePlayer, DailyRewardView dailyRewardView, CurrencyView currencyView, FightWindowView fightWindowView, StartFightView startFightView) { _profilePlayer = profilePlayer; _placeForUi = placeForUi; _dailyRewardView = dailyRewardView; _currencyView = currencyView; _fightWindowView = fightWindowView; _startFightView = startFightView; OnChangeGameState(_profilePlayer.CurrentState.Value); profilePlayer.CurrentState.SubscribeOnChange(OnChangeGameState); }
public DailyRewardController(Transform placeForUi, DailyRewardView dailyRewardView, CurrencyView currencyView) { _dailyRewardView = GameObject.Instantiate(dailyRewardView, placeForUi); _currencyController = new CurrencyController(placeForUi, currencyView); }