Beispiel #1
0
    void Update()
    {
        updateCoolDowns(Time.deltaTime);

        if ((state == GreekState.DASHING || state == GreekState.SHOCKED) && coolDownState <= 0)
        {
            state = GreekState.NORMAL;
        }
    }
Beispiel #2
0
 void shock()
 {
     camera.GetComponent <AudioSource> ().PlayOneShot(sndpain, 1);
     state = GreekState.SHOCKED;
     if (camera != null)
     {
         camera.GetComponent <ScreenShake>().shake();
     }
     coolDownState = 3;
     dropElement();
 }
Beispiel #3
0
 void dash()
 {
     if (possession != null)
     {
         throwElement();
         coolDownDash = 1;
     }
     else if (!tired())
     {
         camera.GetComponent <AudioSource> ().PlayOneShot(snddash, 1);
         camera.GetComponent <AudioSource> ().PlayOneShot(snddash2, 1);
         nextForce    *= 3;
         state         = GreekState.DASHING;
         coolDownState = 0.2f;
         coolDownDash  = 1;
     }
 }