コード例 #1
0
        public GameSession()
        {
            CurrentPlayer = new Player("Chad", "Magic User?", 0, 20, 20, 10, 10, 101);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1005));
            }

            if (!CurrentPlayer.MagicList.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(7001));
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(7002));
            }

            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(8001));

            // Legendary Sword
            CurrentPlayer.LearnRecipe(RecipeFactory.RecipeByID(1));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3000));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3001));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3002));

            // Prison Key
            CurrentPlayer.LearnRecipe(RecipeFactory.RecipeByID(2));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3003));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3004));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3005));

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(-3, 1);
        }
コード例 #2
0
ファイル: GameSession.cs プロジェクト: DanOwen91/RPGGame
        public GameSession()
        {
            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(-1, 0);
            CurrentPlayer   = PlayerFactory.CreatePlayer("Turtle", "Dan");
        }
コード例 #3
0
        public GameSession()
        {
            #region Initialize Player

            CurrentPlayer = new Player("Scott", "Fighter", 0, 10, 10, 1000000);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(2001));
            CurrentPlayer.LearnRecipe(RecipeFactory.RecipeByID(1));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3001));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3002));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3003));

            #endregion Initialize Player

            #region Initialize World

            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);

            #endregion Initialize World
        }
コード例 #4
0
        public GameSessionViewModel(IDialogService dialogService)
        {
            this.dialogService = dialogService;

            CurrentWorld = WorldFactory.CreateWorld();

            // initialise new player
            CurrentPlayer = new Player
            {
                Name             = "Naohtest",
                CharacterClass   = "Mage",
                HitPoints        = 100,
                Gold             = 10,
                ExperiencePoints = 0,
                Level            = 1,
                CurrentLocation  = CurrentWorld.LocationAt(1, -1)
            };

            CurrentPlayer.PlayerMoved += player_PlayerMoved;

            CurrentPlayer.Inventory.Add(ItemFactory.CreateGameItem(1001));
            CurrentPlayer.Inventory.Add(ItemFactory.CreateGameItem(1002));
            CurrentPlayer.Inventory.Add(ItemFactory.CreateGameItem(1003));

            #region Commands
            CommandAddExp       = new RelayCommand(AddExpExecute, AddExpCanExecute);
            CommandMoveNorth    = new RelayCommand(MoveNorthExecute, MoveNorthCanExecute);
            CommandMoveWest     = new RelayCommand(MoveWestExecute, MoveWestCanExecute);
            CommandMoveEast     = new RelayCommand(MoveEastExecute, MoveEastCanExecute);
            CommandMoveSouth    = new RelayCommand(MoveSouthExecute, MoveSouthCanExecute);
            CommandShowInfo     = new RelayCommand(ShowInfoExecute, null);
            CommandShowWorldMap = new RelayCommand(ShowWorldMapExecute, null);
            CommandShowInventar = new RelayCommand(ShowInventarExecute, null);
            #endregion
        }
コード例 #5
0
        //-------------------------------------------------------------------------------------------
        public GameSession()
        {
            int dexterity = RandomNumberGenerator.SimpleNumberBetween(3, 40);

            CurrentPlayer = new Player
                            (
                "Player",
                "Paladin",
                15,
                10,
                10,
                20,
                dexterity
                            );

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddWeaponToWeapons(WeaponFactory.CreateWeapon(1001));
            }
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(6001));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(4000), 4);
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(4001), 4);
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(4002), 4);
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(4003), 4);
            CurrentPlayer.LearnRecipe(RecipeFactory.RecipeByID(1));
            CurrentPlayer.LearnRecipe(RecipeFactory.RecipeByID(2));

            CurrentWorld    = WorldFactory.CreateWorld(CurrentPlayer.Name);
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
コード例 #6
0
ファイル: GameSession.cs プロジェクト: dpnull/con-rogue
        public GameSession()
        {
            // Create message log
            messageLog = new MessageLog();

            // Populate player object
            CurrentPlayer = new Player("Dom", 500, 500, 0, 1, 0);

            // Create new GUI dimensions
            gui = new GUI(100, 30);

            // Create new WorldFactory
            WorldFactory worldFactory = new WorldFactory();

            // Put it into CurrentWorld property
            CurrentWorld    = worldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.GetLocation(0, 0);

            // Create new ActionFactory
            ActionFactory actionFactory = new ActionFactory();

            action       = actionFactory.CreateAction();
            battleAction = actionFactory.CreateBattleAction();


            CurrentPlayer.AddItemToInventory(ItemFactory.CreateItem(2001));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateItem(2002));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateItem(2003));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateItem(1001));

            CurrentPlayer.CurrentWeapon = CurrentPlayer.Inventory.Where(i => i.Type == Item.ItemType.Weapon).FirstOrDefault();
        }
コード例 #7
0
ファイル: GameSession.cs プロジェクト: nietoperek671/SOSCSRPG
        public GameSession()
        {
            #region Create player

            var dex = RandomNumberGenerator.NumberBetween(3, 18);
            CurrentPlayer = new Player("Scott", "Fighter", 0, dex, 10, 10, 1000);

            #endregion

            if (CurrentPlayer.Inventory.Weapons.Any() == false)
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(2001));
            CurrentPlayer.LearnRecipe(RecipeFactory.RecipeByID(1));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3001));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3002));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3003));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(4001));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(4002));

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
        }
コード例 #8
0
ファイル: GameSession.cs プロジェクト: KrIsKa7a/SimpleRPGGame
        public GameSession()
        {
            this.worldFactory = new WorldFactory();

            this.CurrentPlayer = new Player("Kristiyan The Great",
                                            "Magician", 25, 10, 1, 1500);
            this.CurrentWorld    = worldFactory.CreateWorld();
            this.CurrentLocation = this.CurrentWorld.LocationAt(0, 0);
        }
コード例 #9
0
ファイル: GameSession.cs プロジェクト: overseer25/MyRPG
        /// <summary>
        /// Default constructor for a GameSession object.
        /// </summary>
        public GameSession()
        {
            // Create the world
            CurrentWorld = WorldFactory.CreateWorld();

            CurrentPlayer = new Player();

            CurrentLocation = CurrentWorld.GetLocation(0, 0);
        }
コード例 #10
0
        public void CreateWorldInvalid()
        {
            Mock <IExecutableContext> execContextMock = new Mock <IExecutableContext>();
            ConfigManager             config          = new ConfigManager();

            config.Init(".\\TestConfig");
            execContextMock.Setup(f => f.ConfigManager).Returns(config);

            WorldFactory.CreateWorld("FakeName", execContextMock.Object);
        }
コード例 #11
0
ファイル: GameSession.cs プロジェクト: melvingaye/SOSCSRPG
        public GameSession()
        {
            CurrentPlayer = new Player {
                Name = "Melvin", CharacterClass = "Knight", ExperiencePoints = 0, Gold = 0, HitPoints = 100, Level = 0
            };

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
コード例 #12
0
ファイル: GameSession.cs プロジェクト: spacesnaill/SOSCSRPG
        public GameSession()
        {
            //---Player Info---
            CurrentPlayer = new Player {
                Name = "Patrick", CharacterClass = "Fighter", HitPoints = 10, Gold = 100, ExperiencePoints = 0, Level = 1
            };

            //---Location Info---
            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
コード例 #13
0
        public GameSession()
        {
            curPlayer = new Player {
                PlayerName = "Jerry", Gold = 100500, CharacterClass = "Hunter",
                HitPoints  = 10, ExperiencePoints = 0, Level = 1
            };

            curWorld = WorldFactory.CreateWorld();

            curLocation = curWorld.LocationAt(0, -1);
        }
コード例 #14
0
        public GameSession(string characterName)
        {
            CurrentPlayer = new Player(characterName, "Hardcoded", 0, 10, 10, 1000000);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld    = WorldFactory.CreateWorld();    // Stvori world
            CurrentLocation = CurrentWorld.LocationAt(0, 0); // Trenutna lokacija
        }
コード例 #15
0
        public GameSession()
        {
            CurrentPlayer = WorldFactory.CreatePlayer();
            CurrentWorld = WorldFactory.CreateWorld();

            // Every real second is equal to WorldHoursperSecond Hours in the game.
            WorldHoursPerSecond = 1;

            //HACK delete
            AddingNewStation = true;

            CompositionTarget.Rendering += CompositionTarget_Rendering;
        }
コード例 #16
0
        public GameSession()
        {
            CurrentPlayer = new Player(name: "Tahj", characterClass: "Fighter", experiencePoints: 0, maximumHitPoints: 10,
                                       currentHitPoints: 10, strength: 10, dexterity: 10, armorClass: 10, strengthAbilityScore: 0, gold: 10);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
コード例 #17
0
        public GameSession()
        {
            CurrentPlayer = new Player("Vincent", "Azure Administrator", 0, 10, 10, 0, 0);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
        }
コード例 #18
0
        public GameSession()
        {
            CurrentPlayer = new Player("Stanis", 10)
            {
                Fishnet = FishFactory.CreateFishByID(1001, 1002, 1004, 1005, 1003, 1002, 1001, 1006, 1004, 1004, 1007, 1003,
                                                     1001, 1002, 1004, 1005, 1003, 1002, 1001, 1006, 1004, 1004, 1007, 1003),
                Backpack = GearFactory.GetListOfStandardItems()
            };

            WorldFactory factory = new WorldFactory();

            CurrentWorld = factory.CreateWorld();
        }
コード例 #19
0
ファイル: GameSession.cs プロジェクト: HEFLINGA/WPFRPG
        public GameSession()
        {
            CurrentPlayer = new Player("Auston", "Fighter", 0, 10, 10, 1000000);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
コード例 #20
0
ファイル: GameSession.cs プロジェクト: ChuyueL/wpf-rpg
        public GameSession()
        {
            CurrentPlayer = new Player("Chuyue", "Fighter", 0, 10, 10, 1000000);

            //Player should always have something to fight with
            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
コード例 #21
0
 public GameSession()
 {
     CurrentPlayer = new Player
     {
         Name             = "Scott",
         CharacterClass   = "Fighter",
         HitPoints        = 10,
         Gold             = 1000000,
         ExperiencePoints = 0,
         Level            = 1
     };
     CurrentWorld    = WorldFactory.CreateWorld();
     CurrentLocation = CurrentWorld.LocationAt(0, 0);
 }
コード例 #22
0
ファイル: GameSession.cs プロジェクト: vankos/UURRPG
        public void StartTheGame()
        {
            CurrentPlayer = new Player("John Doe", "Scientist", 0, 10, 10, 10, 100);

            if (CurrentPlayer.Inventory.Weapons.Count == 0)
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateItem(1));
            }
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateItem(6));
            CurrentPlayer.LearnScheme(SchemeFactory.GetSchemeById(1));

            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
コード例 #23
0
ファイル: GameSession.cs プロジェクト: Githubgelion/RPG_Game
        public GameSession()
        {
            CurrentPlayer                  = new Player();
            CurrentPlayer.Name             = "Scott";
            CurrentPlayer.CharacterClass   = "Fighter";
            CurrentPlayer.HitPoints        = 10;
            CurrentPlayer.Gold             = 1000000;
            CurrentPlayer.ExperiencePoints = 0;
            CurrentPlayer.Level            = 1;
            WorldFactory factory = new WorldFactory();

            CurrentWorld    = factory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
コード例 #24
0
ファイル: GameSession.cs プロジェクト: Elijah-J/the-end
        public GameSession()
        {
            CurrentPlayer = new Player // object literal - improves readability
            {
                Name             = "Eli",
                CharacterClass   = "Monk",
                HitPoints        = 10,
                Gold             = 1000000,
                ExperiencePoints = 0,
                Level            = 1,
            };

            CurrentWorld    = WorldFactory.CreateWorld(); // we only use this once - so we make this static
            CurrentLocation = CurrentWorld.LocationAt(0, -1);
        }
コード例 #25
0
        public GameSession()
        {
            CurrentPlayer = new Player {
                Name = "Ryan", CharacterClass = "Fighter", HitPoints = 10, Gold = 100000, ExperiencePoints = 0, Level = 1
            };

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
        }
コード例 #26
0
        public GameSession()
        {
            CurrentPlayer                  = new Player();
            CurrentPlayer.Name             = "Gord";
            CurrentPlayer.CharacterClass   = "Barbarian";
            CurrentPlayer.HitPoints        = 10;
            CurrentPlayer.Gold             = 25;
            CurrentPlayer.ExperiencePoints = 0;
            CurrentPlayer.Level            = 1;

            WorldFactory factory = new WorldFactory();

            CurrentWorld = factory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
        }
コード例 #27
0
ファイル: GameSession.cs プロジェクト: ggrumbley/CS_DOS_RPG
        public GameSession()
        {
            CurrentPlayer = new Player
            {
                Name             = "Gary",
                Gold             = 1000000,
                CharacterClass   = "Wizard",
                HitPoints        = 10,
                ExperiencePoints = 0,
                Level            = 1
            };

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
        }
コード例 #28
0
        public GameSession()
        {
            CurrentPlayer = new Player("SK", "Warrior", 0, 10, 10, 1000000);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(2001));
            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, -1);
            CurrentPlayer.LearnRecipe(RecipeFactory.GetRecipeByID(1));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3001));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3002));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3003));
        }
コード例 #29
0
ファイル: GameSession.cs プロジェクト: abnormalyak/BasicRPG
        public GameSession()
        {
            CurrentPlayer            = new Player();
            CurrentPlayer.Name       = "Abnormal";
            CurrentPlayer.Gold       = 500;
            CurrentPlayer.Class      = "Mage";
            CurrentPlayer.Level      = 1;
            CurrentPlayer.Health     = 100;
            CurrentPlayer.Experience = 0;

            WorldFactory factory = new WorldFactory();

            CurrentWorld = factory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(-2, -1);
        }
コード例 #30
0
ファイル: Zeke.cs プロジェクト: Repede/ZekeDemo
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Set up initial values
            _ratio                 = GraphicsDevice.Viewport.AspectRatio;
            _oldWindowSize         = new Point(Window.ClientBounds.Width, Window.ClientBounds.Height);
            _offScreenRenderTarget = new RenderTarget2D(GraphicsDevice, Window.ClientBounds.Width, Window.ClientBounds.Height);

            // Create a new SpriteBatch, which can be used to draw textures.
            _spriteBatch = new SpriteBatch(GraphicsDevice);
            MobFactory mobFactory = new MobFactory(this.Content);

            _mobs.Add(mobFactory.CreatePlayer("Concept/Artwork/Character", new Rectangle(0, 0, 50, 50), 5, 5));
            WorldFactory worldFactory = new WorldFactory(this.Content);

            _world = worldFactory.CreateWorld("Concept/Artwork/Background");
            // TODO: use this.Content to load your game content here
        }