Beispiel #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Set mouse visable.
            this.IsMouseVisible = true;

            conversationController = new ConversationController();
            conversationController.loadFromLibrary(1, Content, spriteBatch);

            oldKeyboardState = Keyboard.GetState();
            oldMouse         = Mouse.GetState();

            MouseLocation = new Vector2(Mouse.GetState().X, Mouse.GetState().Y);

            Character DefaultCharacter = new Character(Content, (int)Constants.CharacterType.Basic);
            Character Steve            = new Character(Content, (int)Constants.CharacterType.Flyer);
            Character Stan             = new Character(Content, (int)Constants.CharacterType.Horse);

            Stan.CharacterController = (int)Constants.CharacterControllerType.Enemy;
            PlayerCharacters         = new List <Character>();
            PlayerCharacters.Add(Steve);
            PlayerCharacters.Add(Stan);

            characterController = new CharacterController();
            characterController.addCharacter(DefaultCharacter);
            characterController.addCharacter(Steve);
            characterController.addCharacter(Stan);
            characterController.moveCharacter(Steve, 2, 2);
            characterController.moveCharacter(Stan, 1, 1);
            characterController.moveCharacter(DefaultCharacter, 0, 0);

            situationController = new SituationController();
            //situationController.loadSituation(0, mapController, characterController, conversationController, Content, spriteBatch);
            List <Texture2D> temp = new List <Texture2D>();

            temp.Add(this.Content.Load <Texture2D>("top32"));
            temp.Add(this.Content.Load <Texture2D>("mid32"));
            temp.Add(this.Content.Load <Texture2D>("bot32"));

            CharacterMenu = new CharacterMenu(temp, this.Content.Load <SpriteFont>("segoe"));

            ////Trader = new Character(Content, (int)Constants.CharacterController.Neutral);
            //ItemLogic.giveTo(Trader, new Item("Steve Spear", 1, 30, (int)Constants.ItemSlot.Weapon));
            //Trader.Items[0].ItemModifier.Mana = 400;
            //ItemLogic.giveTo(Trader, new Item("Steve Stick", 1, 30, (int)Constants.ItemSlot.Weapon));
            //ItemLogic.giveTo(Trader, new Item("Steve Legsicles", 1, 30, (int)Constants.ItemSlot.Legs));
            //ItemLogic.giveTo(Trader, new Item("Steve Chesticles", 1, 30, (int)Constants.ItemSlot.Chest));
            //ItemLogic.giveTo(Trader, new Item("Health Potion", 30, 30, (int)Constants.ItemSlot.Consumable));
            //ItemLogic.giveTo(Trader, new Item("Health Potion", 2, 30, (int)Constants.ItemSlot.Consumable));
            //ItemLogic.giveTo(Trader, new Item("Hurt Potion", 100, 30, (int)Constants.ItemSlot.Consumable));

            //ItemLogic.giveToFrom(characterController.AllCharacters[0], Trader, Trader.Items[4]);
            //ItemLogic.giveToFrom(characterController.AllCharacters[0], Trader, Trader.Items[4]);
            //ItemLogic.giveToFrom(characterController.AllCharacters[0], Trader, Trader.Items[4]);
            ////ItemLogic.equipItem(characterController.AllCharacters[0], characterController.AllCharacters[0].Items[0]);

            //Console.WriteLine(Trader.listInventory());

            //Console.WriteLine(characterController.AllCharacters[0].listInventory());

            //Console.WriteLine(characterController.AllCharacters[0].TotalModifier.Mana);
            // TODO: use this.Content to load your game content here
        }