Ejemplo n.º 1
0
 public void SetStatus(ActionState state)
 {
     CurrentActionState = state;
     if (state == ActionState.GameOver)
     {
         RestartButton.Show();
     }
 }
Ejemplo n.º 2
0
    /*
     *
     *
     *
     */

    private void OnTriggerEnter2D(Collider2D collision)
    {
        Debug.Log("Death");
        RestartButton.Show();

        //GetComponentInChildren<ParticleSystem>().Play();
        death_particle.Play();

        StopToEnemy();
        StopToPlayer();

        //Time.timeScale = 0f;

        GetComponent <AudioSource>().Play();
        GameObject.Find("BGM").GetComponent <AudioSource>().Stop();
    }
Ejemplo n.º 3
0
        public string getJoke()
        {
            string hereItIs = "";
            int    numJokes = Settings.Default.JokeList.Count;
            int    indx     = rand.Next(0, numJokes);
            bool   allSeen  = checkAllSeen();

            if (allSeen)
            {
                JokeResult.Hide();
                RestartButton.Show();
                Notification.Text    = "You've seen all the jokes!";
                JokeResult.BackColor = Color.BlanchedAlmond;
                JokeButton.Hide();
                Like.Hide();
                Dislike.Hide();
            }
            else
            {
                if (Settings.Default.JokeSeen[indx] == "0")
                {
                    hereItIs = Settings.Default.JokeList[indx].ToString();
                    string jokeVal = Settings.Default.LikeOrDislike[indx].ToString();
                    if (jokeVal == "+")
                    {
                        JokeResult.BackColor = Color.OliveDrab;
                        Notification.Text    = "You liked this joke...";
                    }
                    if (jokeVal == "-")
                    {
                        JokeResult.BackColor = Color.IndianRed;
                        Notification.Text    = "You disliked this joke...";
                    }
                }
                else
                {
                    hereItIs = findNextUnseen();
                }

                Settings.Default.CurrentJoke    = indx;
                Settings.Default.JokeSeen[indx] = "1";
                Settings.Default.Save();
            }
            return(hereItIs);
        }