예제 #1
0
 public static void lose(string [] reasoning)
 {
     WorldState.worldinit();
     for (int i = 0; i < players.Length; i++)
     {
         players[i] = new Player(i + 1);
         players[i].setState(new DeathState(players[i], reasoning[i % reasoning.Length]));
     }
     waterRising = false;
 }
예제 #2
0
        public override void run(Player p)
        {
            p.world.editing = true;
            p.world.setBlockAt(17, 3, 0);
            p.world.editing = false;

            if (p.xOffset == 0 && p.x == 16)
            {
                p.dir = 1;
                if (p.y == 3 && p.yOffset == 0)
                {
                    p.dir = 0;
                    if (frames >= 270)
                    {
                        WorldState.worldinit();
                        Player[] players = Game.players;
                        for (int i = 0; i < players.Length; i++)
                        {
                            players[i] = new Player(i + 1);
                            players[i].setState(new EndState(p));
                        }
                        Game.waterRising = false;
                    }
                    else
                    if (frames >= 150)
                    {
                        frames++;
                    }
                    else if (frames >= 140)
                    {
                        buns.attack = true;
                        frames++;
                    }
                    else if (frames == 0)
                    {
                        SoundSystem.setBackgroundMusic("tbc");
                        frames++;
                    }
                    else
                    {
                        frames++;
                    }
                }
                else if (p.yOffset == 0)
                {
                    p.y--;
                    p.yOffset = 15;
                    p.dir     = 1;
                }
                else
                {
                    p.yOffset--;
                    p.dir = 1;
                }
            }
            else if (p.x == 17)
            {
                p.x       = 16;
                p.xOffset = 15;
                p.dir     = 2;
            }
            else
            {
                p.xOffset--;
            }
        }