예제 #1
0
    public virtual void Update()
    {
        switch (curState)
        {
        case ePlayEventState.DANGERSTART:
            DangerStart();

            break;

        case ePlayEventState.DANGER:
            dangerTime += Time.deltaTime;
            DangerUpdate();
            if (dangerTime >= dangerInterval)
            {
                PlayStart();
            }
            break;

        case ePlayEventState.PLAY:
            playTime += Time.deltaTime;
            PlayUpdate();
            if (playTime >= playInterval)
            {
                playTime = 0.0f;

                EventEnd();

                curState = ePlayEventState.PLAYEND;
            }
            break;
        }
    }
예제 #2
0
    virtual public void DangerStart()
    {
        Config[(int)eConfig.DANGER].SetActive(true);
        Config[(int)eConfig.PLAY].SetActive(false);


        curState = ePlayEventState.DANGER;
    }
예제 #3
0
    public void ReSet()
    {
        dangerTime = 0.0f;
        playTime   = 0.0f;

        curState = ePlayEventState.PLAYEND;

        Config[(int)eConfig.PLAY].SetActive(false);
        Config[(int)eConfig.DANGER].SetActive(false);
    }
예제 #4
0
    virtual public void PlayStart()
    {
        playOnTime += Time.deltaTime;
        if (playOnTime >= playOnInterval)
        {
            Config[(int)eConfig.PLAY].SetActive(true);
            Config[(int)eConfig.DANGER].SetActive(false);

            playOnTime = 0;
            dangerTime = 0;

            curState = ePlayEventState.PLAY;
        }
    }
예제 #5
0
 public void Reset()
 {
     curState = ePlayEventState.DANGERSTART;
 }