Esempio n. 1
0
 void Update()
 {
     if (isEnd == false)
     {
         if (isPlayer == true)
         {
             following();
         }
         else if (isPlayer == false)
         {
             if ((vector.x + 1 >= teacherTransform.position.x && vector.x - 1 <= teacherTransform.position.x) && (vector.y + 1 >= teacherTransform.position.y && vector.y - 1 <= teacherTransform.position.y) && (vector.z + 1 >= teacherTransform.position.z && vector.z - 1 <= teacherTransform.position.z))
             {
                 roam();
             }
             else if (isRoam == false)
             {
                 roam();
             }
         }
     }
     else
     {
         MinigameResult.LoadResultScene(isWin, setStat);
     }
 }
Esempio n. 2
0
 public override void endCirculation()
 {
     MinigameResult.LoadResultScene(false, () =>
     {
         CharacterManager.Get_instance().characterStat.charm -= 100;
     });
 }
Esempio n. 3
0
 void Update()
 {
     if (isEnd == false)
     {
         if (TCtrl.isFinish == false && gauge.fillAmount < 1f)
         {
             subTractingValue();
         }
         else if (TCtrl.isFinish == true)
         {
             //Debug.Log("끝!!!");
             isWin = false;
             isEnd = true;
         }
         else if (gauge.fillAmount == 1f)
         {
             isWin = true;
             isEnd = true;
         }
     }
     else
     {
         MinigameResult.LoadResultScene(isWin, setStat);
     }
 }
Esempio n. 4
0
        void handleLose()
        {
            result = MinigameResult.Loss;

            LoseImage.SetActive(true);
            LoseText.SetActive(true);
            StartCoroutine("loseCallback");
        }
Esempio n. 5
0
        void handleWin()
        {
            result = MinigameResult.Win;

            DiplomaAnimator.SetTrigger("Catch");
            WinImage.SetActive(true);
            WinText.SetActive(true);
            StartCoroutine("winCallback");
        }
Esempio n. 6
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag.Equals("Player"))
     {
         MinigameResult.LoadResultScene(true, () =>
         {
             CharacterManager.Get_instance().characterStat.exercise += 200;
             CharacterManager.Get_instance().characterStat.fatigue  += 20;
             CharacterManager.Get_instance().characterStat.hp       -= 10;
         });
     }
 }
 void Update()
 {
     if (judging_game() == false)
     {
         if (random() == true && isPlayAi == true)
         {
             StartCoroutine(changeColor_Ai());
         }
         else
         {
             StopCoroutine(changeColor_Ai());
         }
         red_Text.text  = "빨강: " + red_count.ToString();
         blue_Text.text = "파랑: " + blue_count.ToString();
     }
     else
     {
         whoWin();
         MinigameResult.LoadResultScene(isWin, setStat);
     }
 }
Esempio n. 8
0
    private MinigameResult CheckScoreThreshold()
    {
        //1 star
        if (curScore < curGoodDogThreshold)
        {
            curMinigameResult = MinigameResult.meh;
            resultScreenHolder.PassInResults(1);
            if (null != myAudioSource && null != loseSound)
            {
                myAudioSource.PlayOneShot(loseSound, 0.8f);
            }
        }
        //2 star
        else if (curScore >= curGoodDogThreshold && curScore < curBestestDoggoThreshold)
        {
            curMinigameResult = MinigameResult.goodDoggo;
            resultScreenHolder.PassInResults(2);
            if (null != myAudioSource && null != winSound)
            {
                myAudioSource.PlayOneShot(winSound, 0.8f);
                myAudioSource.PlayOneShot(winSound, 0.8f);
            }
        }
        //3 stars
        else if (curScore >= curBestestDoggoThreshold)
        {
            curMinigameResult = MinigameResult.bestDoggo;
            resultScreenHolder.PassInResults(3);

            if (null != myAudioSource && null != winSound)
            {
                myAudioSource.PlayOneShot(winSound, 0.8f);
                myAudioSource.PlayOneShot(winSound, 0.8f);
                myAudioSource.PlayOneShot(winSound, 0.8f);
            }
        }
        return(curMinigameResult);
    }