private void CheckNextLoginBonus()
 {
     if (MonoBehaviourSingleton <AccountManager> .I.logInBonus == null)
     {
         GameSection.BackSection();
     }
     else if (MonoBehaviourSingleton <AccountManager> .I.logInBonus.Count == 0)
     {
         GameSection.BackSection();
     }
     else
     {
         LoginBonus loginBonus = MonoBehaviourSingleton <AccountManager> .I.logInBonus[0];
         if (loginBonus.priority > 0)
         {
             DispatchEvent("LIMITED_LOGIN_BONUS", null);
         }
         else if (loginBonus.type == 0)
         {
             DispatchEvent("LOGIN_BONUS", null);
         }
         else
         {
             GameSection.BackSection();
         }
     }
 }
Ejemplo n.º 2
0
    public override void Initialize()
    {
        bonus = MonoBehaviourSingleton <AccountManager> .I.logInBonus[0];
        MonoBehaviourSingleton <AccountManager> .I.logInBonus.Remove(bonus);

        base.Initialize();
    }
    public override void Initialize()
    {
        //IL_0272: Unknown result type (might be due to invalid IL or missing references)
        base.Initialize();
        texModel_ = Utility.Find(base._transform, "TEX_MODEL");
        texModelRenderTexture_      = UIModelRenderTexture.Get(texModel_);
        texModelTexture_            = texModel_.GetComponent <UITexture>();
        texInnerModel_              = Utility.Find(base._transform, "TEX_INNER_MODEL");
        texInnerModelRenderTexture_ = UIModelRenderTexture.Get(texInnerModel_);
        texInnerModelTexture_       = texInnerModel_.GetComponent <UITexture>();
        glowModel_ = Utility.Find(base._transform, "LIB_00000003");
        LoginBonus loginBonus = (LoginBonus)GameSection.GetEventData();

        if (loginBonus != null)
        {
            SetLabelText((Enum)UI.LBL_LOGIN_DAYS, loginBonus.name);
            if (loginBonus.reward.Count > 0)
            {
                reward = loginBonus.reward[0];
                SetLabelText((Enum)UI.LBL_GET_ITEM, reward.name);
                if (reward.type == 5)
                {
                    uint itemId = (uint)reward.itemId;
                    texModelRenderTexture_.InitSkillItem(texModelTexture_, itemId, true, false, 45f);
                    texInnerModelRenderTexture_.InitSkillItemSymbol(texInnerModelTexture_, itemId, true, 17f);
                    isModel = true;
                }
                else if (reward.type == 4)
                {
                    SetRenderEquipModel((Enum)UI.TEX_MODEL, (uint)reward.itemId, -1, -1, reward.GetScale());
                    texModelTexture_.width  = 300;
                    texModelTexture_.height = 300;
                    isModel = true;
                }
                else if (reward.type == 1 || reward.type == 2)
                {
                    uint itemModelID = GetItemModelID((REWARD_TYPE)reward.type, reward.itemId);
                    texModelRenderTexture_.InitItem(texModelTexture_, itemModelID, true);
                    isModel = true;
                }
                else if (reward.type == 3 && IsDispItem3D(reward.itemId))
                {
                    uint itemModelID2 = GetItemModelID((REWARD_TYPE)reward.type, reward.itemId);
                    texModelRenderTexture_.InitItem(texModelTexture_, itemModelID2, true);
                    isModel = true;
                }
                if (!isModel)
                {
                    this.StartCoroutine("LoadIcon");
                }
                float rotateSpeed = 35f;
                texModelRenderTexture_.SetRotateSpeed(rotateSpeed);
                texInnerModelRenderTexture_.SetRotateSpeed(rotateSpeed);
            }
        }
    }
Ejemplo n.º 4
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        //ページ初期化処理
        if (m_LoginBonus == null)
        {
            m_LoginBonus = GetComponentInChildren <LoginBonus>();
            m_LoginBonus.SetSizeParfect(new Vector2(0, 0));
        }

        m_bStart = false;
    }
Ejemplo n.º 5
0
    public override void Initialize()
    {
        base.Initialize();
        MonoBehaviourSingleton <AccountManager> .I.DisplayLogInBonusSection();

        texModel_ = Utility.Find(base._transform, "TEX_MODEL");
        texModelRenderTexture_      = UIModelRenderTexture.Get(texModel_);
        texModelTexture_            = texModel_.GetComponent <UITexture>();
        texInnerModel_              = Utility.Find(base._transform, "TEX_INNER_MODEL");
        texInnerModelRenderTexture_ = UIModelRenderTexture.Get(texInnerModel_);
        texInnerModelTexture_       = texInnerModel_.GetComponent <UITexture>();
        glowModel_ = Utility.Find(base._transform, "LIB_00000003");
        LoginBonus loginBonus = MonoBehaviourSingleton <AccountManager> .I.logInBonus.Find((LoginBonus obj) => obj.type == 0);

        if (loginBonus != null)
        {
            MonoBehaviourSingleton <AccountManager> .I.logInBonus.Remove(loginBonus);

            SetLabelText((Enum)UI.LBL_LOGIN_DAYS, loginBonus.total.ToString());
            if (loginBonus.reward.Count > 0)
            {
                LoginBonus.LoginBonusReward loginBonusReward = loginBonus.reward[0];
                SetLabelText((Enum)UI.LBL_GET_ITEM, loginBonusReward.name);
                float rotateSpeed = 35f;
                if (loginBonusReward.type == 5)
                {
                    uint itemId = (uint)loginBonusReward.itemId;
                    texModelRenderTexture_.InitSkillItem(texModelTexture_, itemId, true, false, 45f);
                    texInnerModelRenderTexture_.InitSkillItemSymbol(texInnerModelTexture_, itemId, true, 17f);
                }
                else
                {
                    uint itemModelID = GetItemModelID((REWARD_TYPE)loginBonusReward.type, loginBonusReward.itemId);
                    texModelRenderTexture_.InitItem(texModelTexture_, itemModelID, true);
                }
                texModelRenderTexture_.SetRotateSpeed(rotateSpeed);
                texInnerModelRenderTexture_.SetRotateSpeed(rotateSpeed);
            }
        }
    }
Ejemplo n.º 6
0
 private void SetDummyLogbo()
 {
     dummyLogBo      = new LoginBonus();
     dummyLogBo.next = new List <LoginBonus.NextReward>
     {
         new LoginBonus.NextReward
         {
             count  = 1,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 6,
                     itemId     = 302610650,
                     itemNum    = 10,
                     isGet      = true,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u))
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 2,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 5,
                     itemId     = 100100104,
                     itemNum    = 1,
                     isGet      = true,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 2)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 3,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 1,
                     itemId     = 1,
                     itemNum    = 5,
                     isGet      = false,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 5)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 4,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 1,
                     itemId     = 1,
                     itemNum    = 5,
                     isGet      = false,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 5)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 5,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 1,
                     itemId     = 1,
                     itemNum    = 5,
                     isGet      = false,
                     isPickUp   = true,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 5)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 6,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 4,
                     itemId     = 20260130,
                     itemNum    = 1,
                     isGet      = true,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 3)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 7,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 2,
                     itemId     = 1,
                     itemNum    = 1000000,
                     isGet      = false,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 5)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 8,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 5,
                     itemId     = 100100104,
                     itemNum    = 1,
                     isGet      = false,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 2)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 9,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 6,
                     itemId     = 302610650,
                     itemNum    = 10,
                     isGet      = false,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 6)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 10,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 3,
                     itemId     = 7000400,
                     itemNum    = 1,
                     isGet      = false,
                     isPickUp   = true,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 7)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 11,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 2,
                     itemId     = 1,
                     itemNum    = 100000,
                     isGet      = false,
                     isPickUp   = true,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 5)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 12,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 6,
                     itemId     = 302610650,
                     itemNum    = 10,
                     isGet      = false,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 6)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 13,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 4,
                     itemId     = 20060100,
                     itemNum    = 1,
                     isGet      = false,
                     isPickUp   = true,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 7)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 14,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 1,
                     itemId     = 1,
                     itemNum    = 5,
                     isGet      = false,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 5)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 15,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 6,
                     itemId     = 302610650,
                     itemNum    = 10,
                     isGet      = false,
                     isPickUp   = false,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 6)
                 }
             }
         },
         new LoginBonus.NextReward
         {
             count  = 16,
             reward = new List <LoginBonus.LoginBonusReward>
             {
                 new LoginBonus.LoginBonusReward
                 {
                     name       = "アイテム名1",
                     type       = 4,
                     itemId     = 20060100,
                     itemNum    = 1,
                     isGet      = false,
                     isPickUp   = true,
                     pickUpText = string.Empty,
                     day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 7)
                 }
             }
         }
     };
     dummyLogBo.reward = new List <LoginBonus.LoginBonusReward>
     {
         new LoginBonus.LoginBonusReward
         {
             name       = "リワ\u30fcド",
             type       = 1,
             itemId     = 1,
             itemNum    = 1,
             isGet      = true,
             isPickUp   = false,
             pickUpText = string.Empty,
             day        = string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 8u), 4)
         }
     };
     dummyLogBo.name            = "スペシャル";
     dummyLogBo.type            = 1;
     dummyLogBo.total           = 6;
     dummyLogBo.rotate          = 0;
     dummyLogBo.nowCount        = 6;
     dummyLogBo.priority        = 1;
     dummyLogBo.period_announce = "期間指定の文字列";
     dummyLogBo.boardType       = 2;
     dummyLogBo.loginBonusId    = 1;
 }
Ejemplo n.º 7
0
    private IEnumerator DoInitialize()
    {
        bool connect = false;

        lb = null;
        if (GameSection.GetEventData() != null)
        {
            Protocol.Send <LoginBonusConfirmModel.RequestSendForm, LoginBonusConfirmModel>(post_data: new LoginBonusConfirmModel.RequestSendForm
            {
                loginBonusId = (int)GameSection.GetEventData()
            }, url : LoginBonusConfirmModel.URL, call_back : (Action <LoginBonusConfirmModel>) delegate(LoginBonusConfirmModel ret)
            {
                if (ret.Error == Error.None)
                {
                    if (ret != null && ret.result != null && ret.result.Count > 0)
                    {
                        ((_003CDoInitialize_003Ec__Iterator8D) /*Error near IL_0071: stateMachine*/)._003C_003Ef__this.lb = ret.result[0];
                    }
                    ((_003CDoInitialize_003Ec__Iterator8D) /*Error near IL_0071: stateMachine*/)._003Cconnect_003E__0 = true;
                }
            }, get_param: string.Empty);
            while (!connect)
            {
                yield return((object)null);
            }
        }
        if (!connect)
        {
            lb = MonoBehaviourSingleton <AccountManager> .I.logInBonus[0];
            MonoBehaviourSingleton <AccountManager> .I.logInBonus.Remove(lb);
        }
        if (lb == null)
        {
            base.Initialize();
            while (MonoBehaviourSingleton <GameSceneManager> .I.isChangeing)
            {
                yield return((object)null);
            }
            GameSection.BackSection();
        }
        else
        {
            arrayNow = 0;
            int i = 0;
            for (int count = lb.next.Count; i < count; i++)
            {
                if (lb.next[i].count == lb.nowCount)
                {
                    arrayNow = i;
                    break;
                }
                if (lb.next[i].count > lb.nowCount)
                {
                    arrayNow = i;
                    break;
                }
            }
            int logbo_column_num = 1 + (lb.next.Count - 1) / 5;
            int logbo_now_column = 1 + arrayNow / 5;
            if (logbo_column_num > 3)
            {
                if (logbo_now_column > logbo_column_num - 2)
                {
                    logbo_now_column = logbo_column_num - 2;
                }
                startScrPos = scrollStartHeight + iconHeight * (float)(logbo_now_column - 1);
                isFirst     = true;
            }
            else
            {
                isFirst = false;
            }
            SetPickUp();
            float rotateSpeed = 35f;
            if (pickUpReward.type == 5)
            {
                uint modelID3 = (uint)pickUpReward.itemId;
                texModelRenderTexture_.InitSkillItem(texModelTexture_, modelID3, true, false, 45f);
                texInnerModelRenderTexture_.InitSkillItemSymbol(texInnerModelTexture_, modelID3, true, 17f);
                isModel = true;
            }
            else if (pickUpReward.type == 4)
            {
                SetRenderEquipModel((Enum)UI.TEX_MODEL, (uint)pickUpReward.itemId, -1, -1, pickUpReward.GetScale());
                isModel = true;
            }
            else if (pickUpReward.type == 1 || pickUpReward.type == 2)
            {
                uint modelID = GetItemModelID((REWARD_TYPE)pickUpReward.type, pickUpReward.itemId);
                texModelRenderTexture_.InitItem(texModelTexture_, modelID, true);
                isModel = true;
            }
            else if (pickUpReward.type == 3 && IsDispItem3D(pickUpReward.itemId))
            {
                uint modelID2 = GetItemModelID((REWARD_TYPE)pickUpReward.type, pickUpReward.itemId);
                texModelRenderTexture_.InitItem(texModelTexture_, modelID2, true);
                isModel = true;
            }
            texModelRenderTexture_.SetRotateSpeed(rotateSpeed);
            texInnerModelRenderTexture_.SetRotateSpeed(rotateSpeed);
            LoadingQueue loadingQueue = new LoadingQueue(this);
            string       topImgName   = ResourceName.GetLoginBonusTopImage(lb.loginBonusId);
            topImageLoadObj = loadingQueue.Load(RESOURCE_CATEGORY.LOGINBONUS_IMAGE, topImgName, false);
            if (loadingQueue.IsLoading())
            {
                yield return((object)loadingQueue.Wait());
            }
            base.Initialize();
        }
    }