Esempio n. 1
0
        private void checkForBusStop(object sender, EventArgs e)
        {
            if (Game1.player == null)
            {
                return;
            }
            if (Game1.player.currentLocation == null)
            {
                return;
            }
            if (Game1.player.currentLocation.name == "BusStop")
            {
                // Log.AsyncC("Step1");
                MouseState mState = Mouse.GetState();
                if (mState.LeftButton == ButtonState.Pressed)
                {
                    // Log.AsyncC("Step2");
                    // Log.AsyncC(getMouseTile());
                    if (getMouseTile().X == 7 && (getMouseTile().Y == 11 || getMouseTile().Y == 10))
                    {
                        //  Log.AsyncC("Step3");
                        Menu = new FrameworkMenu(new Microsoft.Xna.Framework.Point(85, 5 * 11 + 22));
                        Menu.AddComponent(new LabelComponent(new Microsoft.Xna.Framework.Point(-3, -16), "Choose destination"));
                        clickables.Add(Menu.upperRightCloseButton);

                        var r = new ButtonFormComponent(new Microsoft.Xna.Framework.Point(-1, 3 + 11 * 3), 65, "Sun Drop City", (t, p, m) => hmm());   //always *4
                        var s = new ButtonFormComponent(new Microsoft.Xna.Framework.Point(-1, 3 + 11 * 1), 65, "Pellican Town", (t, p, m) => bleh());  //always *4
                        var d = new ButtonFormComponent(new Microsoft.Xna.Framework.Point(-1, 3 + 11 * 2), 65, "Callico Desert", (t, p, m) => bleh()); //always *4
                        Menu.AddComponent(r);
                        Menu.AddComponent(s);
                        Menu.AddComponent(d);
                        clickables2.Add(s, 65);
                        clickables2.Add(r, 65);
                        clickables2.Add(d, 65);
                    }
                }
            }
        }