Esempio n. 1
0
    public override void Update(uint elapsed)
    {
        int day_seconds = ChallengeDefine.Rank_Rest_Time - (int)(TimeUtilities.GetNow() % (24 * 60 * 60 * 1000));

        if (day_seconds < 0)
        {
            day_seconds = 0;
        }
        mRankTimer.text = TimeUtilities.GetCountDownHMS(day_seconds);
        Player           player = PlayerController.Instance.GetControlObj() as Player;
        PlayerDataModule pdm    = ModuleManager.Instance.FindModule <PlayerDataModule>();

        if (player != null && !IsPreviewInit)
        {
            mCharacterPreview.SetupCharacter(player.ModelID, null, -1, 0);

            mCharacterPreview.ChangeWeapon(pdm.GetMainWeaponId());
            mCharacterPreview.RotationY = 180;
            IsPreviewInit = true;
        }

        if (IsPreviewInit)
        {
            mCharacterPreview.Update();
        }
    }
Esempio n. 2
0
    void updateTimeCountDown()
    {
        for (int i = 0; i < 3; i++)
        {
            int sec = Module.GetSecondsByEggId((EggType)(i + 1));

            if (sec <= 0)
            {
                freeObj[i].gameObject.SetActive(true);
                timeCountLb[i].gameObject.SetActive(false);

                continue;
            }
            else
            {
                freeObj[i].SetActive(false);
                timeCountLb[i].gameObject.SetActive(true);
            }

            //PDM.SubEggTimeSeconds(et);

            timeCountLb[i].text = TimeUtilities.GetCountDownHMS(sec * 1000);
        }
        //Module.GetSecondsByEggId()
    }