Beispiel #1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            graphics.IsFullScreen = false;
            graphics.PreferredBackBufferHeight = 800;
            graphics.PreferredBackBufferWidth = 1000;

            menuUpdateSpeed = TimeSpan.FromSeconds(0.20f);
            dayDuration = TimeSpan.FromSeconds(4.0f);
            currentDay = 1;
            gameOverText = "";

            newPress = true;
            talkingTo = null;

            gameOver = false;
        }
Beispiel #2
0
        //moved to a method because with the new do commit model, it cant handle two key presses at the same time which made movement annoying.
        private void handleMove(Vector2 nextLocation)
        {
            talkingTo = npcCollision(nextLocation);

            if (talkingTo == null)
            {
                playerObject.DoMove(level);
            }
            else
            {
                //we have hit an NPC, bring up dialog.
                menu.isDisplayed = true;
                menu.menuOptions = talkingTo.getMenuOptions();
                //.string menuText = talkingTo.getMenuText();
                menu.menuText = talkingTo.getMenuText();
                playerObject.CancelMove();
            }
        }