Пример #1
0
 public WorldMapFriend(Point location, Image image, int id, PlayerParty member)
     : base(location, image, id)
 {
     this.member = member;
     isMoving = false;
     isAlive = true;
 }
Пример #2
0
        public void StartCombat(PlayerParty playerParty, CombatPartyMember enemy)
        {
            enemyMember = enemy;

            playerPartyMembers.Add(playerParty.member1);
            playerPartyMembers.Add(playerParty.member2);
            inCombat = true;

            Party1.Image = playerPartyMembers[0].Img;
            Party2.Image = playerPartyMembers[1].Img;
            Enemy1.Image = enemyMember.Img;
            LoadSkillsForPlayer();
        }
Пример #3
0
        public Game(Form gameForm)
        {
            this.GameForm = gameForm;
            this.GameForm.Height = 800;
            this.GameForm.Width = 800;
            this.GameForm.BackColor = Color.White;

            worldMap = new WorldMap(GameForm);

            inCombat = false;

            Bitmap bmp = new Bitmap("PlayerPartySprite.png");
            Bitmap bmpMon = new Bitmap("MonsterSprite.png");

            playerParty = new PlayerParty(new Point(160, 520), bmp, 1, new CombatPartyMember(50, 5, new Bitmap("WarriorHeroSprite.png")));

            monsters = new List<WorldMapMonster>();
            monsters.Add(new WorldMapMonster(new Point(560,120), bmpMon, 2, new CombatPartyMember(10, 5, new Bitmap("BehemothSprite.png"))));
            monsters.Add(new WorldMapMonster(new Point(560, 240), bmpMon, 2, new CombatPartyMember(10, 5, new Bitmap("BehemothSprite.png"))));
            monsters.Add(new WorldMapMonster(new Point(600, 240), bmpMon, 2, new CombatPartyMember(10, 5, new Bitmap("BehemothSprite.png"))));
            monsters.Add(new WorldMapMonster(new Point(720, 80), new Bitmap("BossMonsterSprite.png"), 2, new CombatPartyMember(100, 15, new Bitmap("BossMonsterSprite.png"))));

            friendlyHeroes = new List<WorldMapSprite>();
            friendlyHeroes.Add(new WorldMapSprite(new Point(400, 240), new Bitmap("rogue2.png"), 3));
            friendlyHeroes[0].textFileName = "rogueIntro";

            textBoxReader = new TextBoxReader();

            //combatGUI = new CombatGUI();
            //combatGUI.Visible = true;
            inCombat = false;

            //Add combat party members for this class
            //playerParty = new PlayerParty(new Point(80, 0), new Bitmap("PlayerPartySprite.png"), 1,
            //    new CombatPartyMember(10, 5, new Bitmap("PlayerKnightCombatSprite.png")));

            worldMapSpritePb = new PictureBox();
            worldMapSpritePb.Height = GameForm.Height;
            worldMapSpritePb.Width = GameForm.Width;
            worldMapSpritePb.BackColor = Color.Transparent;
            worldMapSpritePb.Parent = GameForm;

            Draw();
        }