Flash() public static method

public static Flash ( ) : void
return void
コード例 #1
0
 void WrongAnswer()
 {
     GMAudioSource.Play();
     shake.Shake(0.08f, 0.2f); // shakes screen slightly
     flash.Flash();            // Flashes a red screen
     timer.DecTime();          // Removs a set amount of time
 }
コード例 #2
0
 void OnCollisionEnter(Collision collision)
 {
     Debug.Log(collision.gameObject.name);
     if (collision.gameObject.name == "Bullet(Clone)")
     {
         RedFlash.Flash();
         Destroy(collision.gameObject);
     }
 }
コード例 #3
0
    void WrongAnswer()
    {
        countConsecutiveCorrect = 0;

        GMAudioSource.clip = wrongAnswer;
        GMAudioSource.Play();

        shake.Shake(0.08f, 0.2f); // shakes screen slightly
        flash.Flash();            // Flashes a red screen
        lives.DecLife();          // Removes a life
    }
コード例 #4
0
    void WrongAnswer(Stack <int> was)
    {
        Debug.Log("Wrong!");
        shake.Shake(0.08f, 0.2f);
        flash.Flash();

        // Move Kappa closer to screen
        Vector3 pos = kappa.transform.localPosition;

        pos.y -= 1.15f;
        kappa.transform.localPosition = pos;

        Vector3 scale = kappa.transform.localScale;

        scale.x += 0.16f;
        scale.y += 0.16f;
        kappa.transform.localScale = scale;

        // Decrement Life and Remove 1 Heart
        lives -= 1;
        Debug.Log("lives = " + lives);

        heartHolder.GetChild(lives).gameObject.SetActive(false);


        // Highlight slots with wrong answers in them
        Color colorRed;

        colorRed   = Color.red;
        colorRed.a = 0.393f;

        while (was.Count > 0)
        {
            int cur = was.Pop();
            currentSlots[cur].GetComponent <Image>().color = colorRed;
        }

        // Die opperation if life < 0
        if (lives <= 0)
        {
            UI_Interface.SetActive(false);
            UI_DnD.SetActive(false);
            Pause_Menue.SetActive(false);
            itemView.SetActive(false);
            DieScreen.SetActive(true);
        }
    }