コード例 #1
0
        public void PushNewState(UIState state)
        {
            if (state.state == UIStateEnum.eStartDailyProcessBar || state.state == UIStateEnum.eDrinkFail)
            {
                if (IsExistState(state.state))
                {
                    return;
                }
            }
            if (state.state == UIStateEnum.eRefreshMainByData)
            {
                RemoveSameState(state);
            }
            if (state.state == UIStateEnum.eMissionComplete)
            {
                FlurryUtil.LogEvent("Mission_Daily_count");
            }
            else if (state.state == UIStateEnum.eTreasureBoxOpen)
            {
                FlurryUtil.LogEvent("Nim_Chest_Open_daily_count");
            }
            else if (state.state == UIStateEnum.eDailyGoalCrownComplete)
            {
                switch ((int)state.value0)
                {
                case 0:
                {
                    FlurryUtil.LogEvent("Dailygoal_30_Archived_Event");
                }
                break;

                case 1:
                {
                    FlurryUtil.LogEvent("Dailygoal_60_Archived_Event");
                }
                break;

                case 2:
                {
                    FlurryUtil.LogEvent("Dailygoal_100_Archived_Event");
                }
                break;
                }
            }

            if (IsSilenceMode(state.state))
            {
                MainPresentBase present = GetPresentByEnum(state.state);
                if (present != null)
                {
                    present.ProcessState(state);
                }

                if (CurrentPresent == null)
                {
                    listState.Clear();
                    CurrentPresent = present;
                    return;
                }
                else
                {
                    if (!IsSilenceMode(CurrentPresent.GetStateEnum()))
                    {
                        ClearState();
                        CurrentPresent = present;
                        return;
                    }
                }
            }
            else if (CurrentPresent != null && IsSilenceMode(CurrentPresent.GetStateEnum()))
            {
                if (state.state != UIStateEnum.eRefreshMainByData && state.state != UIStateEnum.eStartDailyProcessBar)
                {
                    if (state.state == UIStateEnum.eDropWaterAni)
                    {
                        if (CurrentPresent.GetStateEnum() == UIStateEnum.eSchoolMode)
                        {
                            FlurryUtil.LogEvent("Drink_In_Schoolmode_Daily_Count");
                        }
                        else if (CurrentPresent.GetStateEnum() == UIStateEnum.eSleepMode)
                        {
                            FlurryUtil.LogEvent("Drink_In_Sleepmode_Daily_Count");
                        }
                    }
                    else if (state.state == UIStateEnum.eDailyProcessIncrease || state.state == UIStateEnum.eMissionFadeInOut)
                    {
                        MainPresentBase present = GetPresentByEnum(state.state);
                        if (present != null)
                        {
                            present.ProcessState(state);
                        }
                    }
                    return;
                }
            }
            if (state.state == UIStateEnum.eDropWaterAni)
            {
                FlurryUtil.LogEvent("Drink_Nomal_Daily_Count");
            }

            listState.Add(state);
        }
コード例 #2
0
 public virtual void ProcessState(UIState state)
 {
     bFinish = true;
 }