Example #1
0
 private void CallBackStartCut(string objName)
 {
     this.currentStatus = STATUS_ENUM.COUNT;
     this.startObject.WasCut();
     this.resultModalPresenter.Close();
     StartCoroutine(this.SetCountDown());
 }
Example #2
0
    private void UpdateFinish()
    {
        this.context.WatchStop();
        ResultModalModel model =
            new ResultModalModel(this.context.correctCount,
                                 this.context.quizCount,
                                 this.context.playTime,
                                 this.startObject,
                                 this.context);

        resultModalPresenter.Show(model);
        this.currentStatus = STATUS_ENUM.SHOW_RESLUT;
        SetActive(this.trStart, true);
        SetActive(this.objPlay, false);
    }
Example #3
0
    private void UpdatePlay()
    {
        if (!this.context.isPlay)
        {
            this.currentStatus = STATUS_ENUM.FINISH;
            return;
        }
        SetLabel(this.curretAnswer, this.context.currentAnswer.ToString());
        SetLabel(this.numMinus, this.context.numMinus.ToString());
        SetLabel(this.correctCount, this.context.correctCount.ToString());

        TimeSpan ts = new TimeSpan(0, 0, Mathf.RoundToInt(this.context.playTime));

        SetLabel(this.time, string.Format("{0:D2}:{1:D2}", ts.Minutes, ts.Seconds));
        //this.context.SetLeftTime(Time.deltaTime);
    }
Example #4
0
    // Use this for initialization
    private void Start()
    {
        this.currentStatus = STATUS_ENUM.START;

        //this.eventController.Init(this.CallbackCut, this.context);
        this.answerController.Init(this.context, CallbackCut);
        this.sordCotroller.Init(this.context);

        //startObject = ResourceLoader.Instance.Create<StartObject>("Prefabs/CubeStart", trStart);
        startObject.Init("Start", this.context);
        startObject.cutEvent += CallBackStartCut;

        SetActive(this.objCountDown, false);
        SetActive(this.objPlay, false);

        resultModalPresenter = ResourceLoader.Instance.Create <ResultModalPresenter>("Prefabs/ResultModal", trResult, false);
    }
Example #5
0
        void StatusPointUp(AbilityBinding <int> dataCxtx, int changeValue)
        {
            if (dataCxtx == null)
            {
                return;
            }
            if ((Keyboard.IsKeyDown(Key.LeftShift)) || (Keyboard.IsKeyDown(Key.RightShift)))
            {
                changeValue *= 10;
            }
            STATUS_ENUM statusName = (STATUS_ENUM)Enum.Parse(typeof(STATUS_ENUM), dataCxtx.Name);

            for (int i = changeValue; i != 0; i--)
            {
                user_data.Base_Level.RemainPoint -= user_data.Status.List[(int)statusName].NecessaryPoint;
                user_data.Status.List[(int)statusName].Point++;
            }
            MainWindow._user_data_manager.CalcUserData();
        }
Example #6
0
    private void FinishCountDown()
    {
        //this.cdCountDown.Init(3f, ()=>
        //{
        this.currentStatus = STATUS_ENUM.PLAY;
        this.context.Init();
        this.context.StartPlay();
        //this.answerController.Init(this.context);
        this.answerController.SetAnswers();

        CallSwitchInvoke();
        Invoke("CallSwitchInvoke", 0.5f);

        SetActive(this.trStart, false);
        SetActive(this.objCountDown, false);
        SetActive(this.objPlay, true);
        //if (this.audioSource != null)
        //{
        //    this.audioSource.PlayOneShot(this.audioClip);
        //}

        //},
        //true);
    }
Example #7
0
 public int GetStatus(STATUS_ENUM status_name)
 {
     return(List[(int)status_name].Point + List[(int)status_name].AddPoint);
 }