Exemplo n.º 1
0
    IEnumerator doFallanimation1()
    {
        //	Debug.Log("in dofall1 " + THETIME);

        canwalk = false;
        animation.CrossFade("falling");


        //Debug.Log("GOThitt in fall1 at " + THETIME);
        this.transform.GetComponent <CapsuleCollider>().enabled = false;
        yield return(new WaitForSeconds(1.5f * animation["falling"].length));

        curr_state = AlbertState.Invincible;
    }
Exemplo n.º 2
0
 void TakeABeating()
 {
     MusicAudioSource.clip = myAudioclip;
     MusicAudioSource.Play();
     //Debug.Log("collisioat " + THETIME);
     curr_state = AlbertState.GotHit;
     //  Debug.Log("Vowel");
     Context.PlayerHealth.DecreaseHealth();
     Instantiate(Resources.Load("Explosions/blackStars1"),
                 transform.position,
                 Quaternion.Euler(-180, 0, 0));
     StartCoroutine(doFallanimation1());
     StartCoroutine(doFallanimation2());
 }
Exemplo n.º 3
0
    IEnumerator doFallanimation2()
    {
        //Debug.Log("in dofall-2 " + THETIME);
        //Debug.Log("isinvis in fall02 at " + THETIME);

        while (blinkCount < numberOfTimesToBlink)
        {
            SMR.enabled = !SMR.enabled;

            if (SMR.enabled == true)
            {
                blinkCount++;
            }

            yield return(new WaitForSeconds(blinkRate));
        }
        blinkCount = 0;
        curr_state = AlbertState.Playing;
        this.transform.GetComponent <CapsuleCollider>().enabled = true;
        // Debug.Log("in dofal-2 end of func" + THETIME);
    }