示例#1
0
 public Creature(string name, Vector2 worldIndex, MovementType movementType, Stat hitPoints, Stat mana, ITurnStrategy turnStrategy, IDrawStrategy drawStrategy, IDeathStrategy deathStrategy, IAttackStrategy attackStrategy, World world, IRemains remains)
 {
     MovementType = movementType;
     WorldIndex = worldIndex;
     Name = name;
     Health = hitPoints;
     Mana = mana;
     TurnStrategy = turnStrategy;
     DrawStrategy = drawStrategy;
     DeathStrategy = deathStrategy;
     AttackStrategy = attackStrategy;
     _world = world;
     Inventory = new List<IItem>();
     Spells = new List<ISpell>();
     TemporaryEffects = new List<ITemporaryEffect>();
     ViewDistance = new Stat(15);
     Remains = remains;
 }
示例#2
0
        public PlayerCharacter(Vector2 worldIndex, World world)
        {
            _tileImage = ContentHelper.Content.Load<Texture2D>("HumanWarrior");
            WorldIndex = worldIndex;
            _world = world;
            Weapon = WeaponFactory.CreateSword(new Vector2(0, 0), world);
            Name = "Player";
            Health = new Stat(25);
            Mana = new Stat(20);
            MovementType = MovementType.Walking;
            Inventory = new List<IItem>();
            Spells = new List<ISpell>();
            TemporaryEffects = new List<ITemporaryEffect>();
            ViewDistance = new Stat(20);
            Inventory.Add((IItem)Weapon);
            Remains = RemainsFactory.CreateBones(new Vector2(0, 0), world);

            Spells.Add(SpellFactory.CreateHealSelfSpell(world));
            Spells.Add(SpellFactory.CreateFireballSpell(world));
            Spells.Add(SpellFactory.CreateInfernoSpell(world));
            Spells.Add(SpellFactory.CreateFlameSpell(world));
            Spells.Add(SpellFactory.CreateFirewallSpell(world));
            Spells.Add(SpellFactory.CreateTeleportSpell(world));
        }