コード例 #1
0
    protected void ResetAll()
    {
        this.status        = MushroomHitStatus.None;
        this.gameTime      = 0f;
        this.gameCD        = 0f;
        this.accelStage    = 0;
        this.accelCD       = 0f;
        this.accelConfig   = null;
        this.isMaxAccel    = false;
        this.newMushroomCD = 0f;
        this.score         = 0;
        this.combo         = 0;
        this.comboMissCD   = 0f;
        this.m_ComboControl.SetCombo(false, 0, false);
        this.plantTimeMushroomCount = 0;
        this.refreshGameTimeCount   = 0f;
        this.SetGameTimeText();
        this.ClearPlantList();
        this.m_RestoreList.Clear();
        this.m_MushroomKillList.Clear();
        this.m_MushroomKillList.Add(0, 0);
        List <MoGuBiao> dataList = DataReader <MoGuBiao> .DataList;

        using (List <MoGuBiao> .Enumerator enumerator = dataList.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                MoGuBiao current = enumerator.get_Current();
                this.m_MushroomKillList.Add(current.id, 0);
            }
        }
    }
コード例 #2
0
    protected void GoStart()
    {
        this.status               = MushroomHitStatus.Start;
        this.gameCD               = this.defaultTime;
        this.gameTime             = 0f;
        this.refreshGameTimeCount = 0f;
        this.accelStage           = 1;
        this.accelConfig          = DataReader <ShuaXinPinLv> .Get(this.accelStage);

        EventDispatcher.Broadcast <ShuaXinPinLv>(EventNames.MushroomAccel, this.accelConfig);
        this.accelCD       = 0f;
        this.isMaxAccel    = false;
        this.newMushroomCD = 0f;
        this.SetGameTimeText();
    }
コード例 #3
0
    protected void UpdateField(float deltaTime)
    {
        this.refreshGameTimeCount += Time.get_deltaTime();
        if ((double)this.refreshGameTimeCount > 0.8)
        {
            this.refreshGameTimeCount = 0f;
            this.SetGameTimeText();
        }
        if (!this.isMaxAccel)
        {
            this.accelCD += deltaTime;
            if (this.accelCD > (float)this.accelConfig.time)
            {
                ShuaXinPinLv shuaXinPinLv = DataReader <ShuaXinPinLv> .Get(this.accelStage + 1);

                if (shuaXinPinLv != null)
                {
                    this.accelStage++;
                    this.accelConfig = shuaXinPinLv;
                    this.accelCD     = 0f;
                    EventDispatcher.Broadcast <ShuaXinPinLv>(EventNames.MushroomAccel, this.accelConfig);
                }
                else
                {
                    this.isMaxAccel = true;
                }
            }
        }
        this.newMushroomCD += deltaTime;
        if (this.newMushroomCD > (float)this.accelConfig.frequency / 1000f)
        {
            this.newMushroomCD = 0f;
            this.PlantMushroom();
        }
        this.CheckComboFail(Time.get_deltaTime());
        EventDispatcher.Broadcast <float>(EventNames.MushroomLifeTime, Time.get_deltaTime());
    }
コード例 #4
0
 public void MushroomAccel(ShuaXinPinLv config)
 {
     this.lifeAccel = (float)config.speed / 1000f;
 }