Ejemplo n.º 1
0
    public IEnumerator signmes()
    {
        //do stuff

        //wait for space to be pressed
        signrun       = true;
        player.locked = true;
        StartCoroutine(text.print(" <i>You read the sign</i>", .7f, false, false, TMPro.TextAlignmentOptions.Center));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }

        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print(say, .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }


        StartCoroutine(text.print("", .0f));
        signrun       = false;
        player.locked = false;
        introlevel    = 1;

        //do stuff once space is pressed
    }
Ejemplo n.º 2
0
 public IEnumerator intro0()
 {
     //do stuff
     molenotrun = true;
     //wait for space to be pressed
     player.locked = true;
     StartCoroutine(text.print(" <i>You talk to the mole</i>", .7f, false, false, TMPro.TextAlignmentOptions.Center));
     while (PlayerText.printdone == false)
     {
         yield return(null);
     }
     while (Input.GetKeyDown("z") == false)
     {
         yield return(null);
     }
     StartCoroutine(text.print("You have unlocked " + Playerbadges.amountbadges + " out of 2 badges", .7f, false));
     while (PlayerText.printdone == false)
     {
         yield return(null);
     }
     while (Input.GetKeyDown("z") == false)
     {
         yield return(null);
     }
     if (Playerbadges.amountbadges == 2)
     {
         StartCoroutine(text.print("Wow. That's all of them", .7f, false));
         while (PlayerText.printdone == false)
         {
             yield return(null);
         }
         while (Input.GetKeyDown("z") == false)
         {
             yield return(null);
         }
         StartCoroutine(text.print("You should go to the hidden door in the dungeon", .5f, false));
         while (PlayerText.printdone == false)
         {
             yield return(null);
         }
         while (Input.GetKeyDown("z") == false)
         {
             yield return(null);
         }
     }
     StartCoroutine(text.print("", .0f));
     player.locked = false;
     molenotrun    = false;
     //do stuff once space is pressed
     introlevel = 1;
 }
Ejemplo n.º 3
0
    public IEnumerator intro0()
    {
        //do stuff
        molenotrun = true;
        //wait for space to be pressed
        player.locked = true;
        StartCoroutine(text.print(" <i>You talk to the mole</i>", .7f, false, false, TMPro.TextAlignmentOptions.Center));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("How did you defeat the creature", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("Thats impossible", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("Your evil creation", .5f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("", .0f));
        player.locked = false;
        molenotrun    = false;
        //do stuff once space is pressed
        introlevel = 1;
    }
    public IEnumerator foundbow()
    {
        bow = true;
        StartCoroutine(text.print("You found a bow! Press Space to use it", .7f, false, true, TMPro.TextAlignmentOptions.Center));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("", .0f));
        opened = true;
    }
Ejemplo n.º 5
0
    public IEnumerator dead()
    {
        print("dead");
        StartCoroutine(text.print(" You Died.Science only leads to doom.Press Z to respawn", .7f, false, false, TMPro.TextAlignmentOptions.Center));
        print("kil");
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }

        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        print("done");

        StartCoroutine(text.print("", .0f));
        text.Box.SetActive(false);
        if (PlayerController.lastloc == 1)
        {
            PlayerController.lastloc = 0;
            SceneManager.LoadScene("Dungeon");
        }
        else if (PlayerController.lastloc == 2)
        {
            PlayerController.lastloc = 0;
            SceneManager.LoadScene("hallway");
        }
        else if (PlayerController.lastloc == 3)
        {
            PlayerController.lastloc = 0;
            SceneManager.LoadScene("fight");
        }
        else
        {
            PlayerController.lastloc = 0;
            SceneManager.LoadScene("doublebattle");
        }
    }
Ejemplo n.º 6
0
    public IEnumerator keypick()
    {
        //wait for space to be pressed

        player.locked = true;
        StartCoroutine(text.print(" <i>You found a </i>" + item, .7f, false, false, TMPro.TextAlignmentOptions.Center));
        print("kil");
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }

        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("", .0f));
        text.Box.SetActive(false);
        player.locked = false;
        Destroy(this.gameObject);
    }
Ejemplo n.º 7
0
    public IEnumerator intro0()
    {
        //do stuff

        //wait for space to be pressed
        intro0run     = true;
        player.locked = true;
        StartCoroutine(text.print(" <i>You talk to the messenger</i>", .7f, false, false, TMPro.TextAlignmentOptions.Center));
        print("kil");
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }

        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("HELP, some monster just ran by", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("He took all my stuff", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("Who would create such a thing", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("", .0f));
        player.locked = false;
        introlevel    = 1;
        intro0run     = false;
        //do stuff once space is pressed
    }
Ejemplo n.º 8
0
    public IEnumerator exit()
    {
        StartCoroutine(text.print(" <i>You will leave the dungeon </i>", .7f, false, false, TMPro.TextAlignmentOptions.Center));
        print("kil");
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }

        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        SceneManager.LoadScene(scene);
    }
Ejemplo n.º 9
0
    public void OnCollisionEnter2D(Collision2D col)
    {
        for (int count = 0; count < badge.badges.Count; count++)
        {
            string currentbadge = badge.badges[count].returnname();
            if (col.gameObject.name == currentbadge)
            {
                if (badge.badges[count].unlocked == false)
                {
                    badge.badges[count].unlocked = true;
                    amountbadges++;
                    print(amountbadges);
                    StartCoroutine(text.print(badge.badges[count].name + " Unlocked!", .9f, true, true, TMPro.TextAlignmentOptions.Center));

                    print(amountbadges);
                }
            }
        }
    }
Ejemplo n.º 10
0
    public IEnumerator fight()
    {
        //do stuff

        //wait for space to be pressed
        EnemyController.start = false;
        intro0run             = true;
        player.locked         = true;
        StartCoroutine(text.print(" <i>The monster notices you</i>", .7f, false, false, TMPro.TextAlignmentOptions.Center));
        print("kil");
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }

        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("Finally, my creator, you have arrived", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("My guard was supposed to take care of you", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("Soon, I will be able to take over the world", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("I'll make more like me", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("This couldn't have happened without you", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("You tried to play god and ended up creating a devil", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("HAHAHHAHAHAHHAHAHAHAHHA", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("Minions finish him off", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("", .0f));
        player.locked = false;
        introlevel    = 1;
        intro0run     = false;
        boss.velocity = new Vector2(0, .25f);
        bossanim.SetBool("walkback", true);
        EnemyController.start = true;
        print("start");
        //do stuff once space is pressed
    }
Ejemplo n.º 11
0
    public IEnumerator story()
    {
        vlad.SetActive(true);
        StartCoroutine(text.print("You have made a grave mistake.", 0.7f, false, true, TMPro.TextAlignmentOptions.TopLeft));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("In your attempt to animate the dead, you've released a beast upon the land", 0.7f, false, true, TMPro.TextAlignmentOptions.TopLeft));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("The evil deformed creation has been ravaging the poor people of the lands", 0.7f, false, true, TMPro.TextAlignmentOptions.TopLeft));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("It was last seen running into the caves up north", 0.7f, false, true, TMPro.TextAlignmentOptions.TopLeft));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("You need to stop it before it takes over the world", 0.7f, false, true, TMPro.TextAlignmentOptions.TopLeft));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("Sometimes dead is better", 0.7f, false, true, TMPro.TextAlignmentOptions.TopLeft));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("I wish you good luck", 0.7f, false, true, TMPro.TextAlignmentOptions.TopLeft));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("You will need it", 0.7f, false, true, TMPro.TextAlignmentOptions.TopLeft));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        SceneManager.LoadScene("Start");
    }
Ejemplo n.º 12
0
    public IEnumerator fight()
    {
        //do stuff

        //wait for space to be pressed
        intro0run     = true;
        player.locked = true;
        StartCoroutine(text.print(" <i>You encounter a guard</i>", .7f, false, false, TMPro.TextAlignmentOptions.Center));
        print("kil");
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }

        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }
        StartCoroutine(text.print("Get ready to fight", .7f, false));
        while (PlayerText.printdone == false)
        {
            yield return(null);
        }
        while (Input.GetKeyDown("z") == false)
        {
            yield return(null);
        }

        StartCoroutine(text.print("", .0f));
        player.locked         = false;
        introlevel            = 1;
        intro0run             = false;
        EnemyController.start = true;
        print("start");
        //do stuff once space is pressed
    }