Esempio n. 1
0
    //管理
    public override IEnumerator LevelManagement(params object[] args)
    {
        CT2.DisplaySliderBar();         //更新難度條

        coffeeCup = (ICoffeeCup)args [0];

        coffeeCup.start();

        yield break;
    }
Esempio n. 2
0
    IEnumerator Loop2(int Loop, ICoffeeCup ICC)
    {
        int CheckCode = 0;

        yield return(StartCoroutine(LevelManagement(ICC)));

        for (int i = 0; i < Loop; i++)
        {
            //隨機亂數
            yield return(StartCoroutine(MakeRandom(CT2.useL2DB.random)));

            //亮燈
            yield return(StartCoroutine(ShowLight()));

            //答案比對
            yield return(StartCoroutine(AnswerCompare()));

            //重置
            yield return(StartCoroutine(Reset()));

            if (CT2.Feedback())
            {
                CheckCode = 1;
                break;
            }

            if (CT2.useL2DB.TimeOut)
            {
                CheckCode = 2;
                break;
            }
        }

        coffeeCup.stop();

        yield return(CheckCode);       //回傳至Loop1
    }
 public HomeController(ICoffeeCup coffeeCup)
 {
     _coffeeCup = coffeeCup;
 }
Esempio n. 4
0
 public Level(int Loop, int random, ICoffeeCup ICC)
 {
     this.Loop   = Loop;
     this.random = random;
     this.ICC    = ICC;
 }