예제 #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         if (!HasFireballOut && fireballs.Count > 0)
         {
             spawnFireball(playerAnim.facingRight);
         }
         else
         {
             if (currentFireball != null && currentFireball.canDetonate)
             {
                 currentFireball.Detonate();
                 StopAllCoroutines();
                 StartCoroutine(cameraShake());
             }
         }
     }
 }