Beispiel #1
0
        private void Start()
        {
            oddJobsTab.AddClickListener(() =>
            {
                oddJobsTab.SetActive();
                activityTabCanvas.SetActive(true);
                tasksTab.SetActive(false);
                tasksTabCanvas.SetActive(false);
            });
            tasksTab.AddClickListener(() =>
            {
                oddJobsTab.SetActive(false);
                activityTabCanvas.SetActive(false);
                tasksTab.SetActive();
                tasksTabCanvas.SetActive(true);
            });
            days.ForEach(day =>
            {
                day.AddClickListener(() =>
                {
                    if (activityService.DailyActivity.Claimable(day.day))
                    {
                        activityService.ClaimDaily(day.day, data =>
                        {
                            if (data.looted != null)
                            {
                                var lootedPopup = popupCanvasController.OpenPopup(lootedPrefab);
                                lootedPopup.SetLooted(data.looted);
                            }
                        });
                    }
                });
            });

            UpdateTabAlerts();
            UpdateActivityTab();
            UpdateTasksTab();

            signalBus.Subscribe <ActivitySignal>(ConsumeActivitySignal);
            signalBus.Subscribe <TaskSignal>(ConsumeTaskSignal);
        }