示例#1
0
 void _StartInGame()
 {
     Debug.Log("StartInGame");
     this.state             = 2;
     this.ui_count.text     = "スマホを振る!!";
     this.ingame_start_time = Time.time;
     AndroidVibraotr.Vibrate(500);
 }
示例#2
0
 void _StartCounting()
 {
     Debug.Log("StartCounting");
     this.state            = 1;
     this.count            = 3;
     this.count_start_time = Time.time;
     AndroidVibraotr.Vibrate(10);
 }
示例#3
0
 void _UpdateCounting()
 {
     if (Time.time - this.count_start_time > 1)
     {
         this.count            = this.count - 1;
         this.count_start_time = Time.time;
         AndroidVibraotr.Vibrate(10);
     }
     if (this.count > 0)
     {
         this.ui_count.text = this.count + "";
     }
     else
     {
         this._StartInGame();
     }
 }
示例#4
0
    void _StartResult()
    {
        Debug.Log("Result");
        this.state = 3;
        if (this.g_score > this.g_highScore)
        {
            this.g_highScore = Mathf.FloorToInt(this.g_score);
        }

        this.ui_count.text = "タップしてもう一度";

        // 誤タップ防止
        this.isTouchDown = false;
        this.isTouchUp   = false;

        AndroidVibraotr.Vibrate(1500);
        this.result_start_time = Time.time;
    }