public Camera(Creature focus, int width, int height, Map nMap) { this.focus = focus; this.width = width; this.height = height; this.map = nMap; origin = new Coord(width / 2, height / 2); visiblePositions = new bool[width, height]; }
public override void Attack(Creature aEnemy) { Trace.WriteLine("Player has attacked " + aEnemy.Name); //for now, make it simple int damage = Strength; //get damage based on weapon damage += ((Weapon)(((Player)this).EquipmentIn(EquipmentTypes.MELEE_WEAPON))).Damage; Trace.WriteLine("Player attacks zombie with " + EquipmentIn(EquipmentTypes.MELEE_WEAPON).Name + " for " + damage + " damage"); aEnemy.Health -= damage; if (aEnemy.Health <= 0) { aEnemy.Die(); //if it's a gun, make a NoiseEvent //EventHandler.Instance.AddEvent(EventFactory.CreateKillEntityEvent(aEnemy)); } }
public virtual void Attack(Creature aDefender) { }
public void RemoveObject(Creature aCreature) { MapEntities.Remove(aCreature); RemoveObject((GameObject)aCreature); }