Beispiel #1
0
 public void DoDamage(EnemyUnit target)
 {
     target.Life.Count = target.Life.Count - 1;
 }
Beispiel #2
0
 public VisualEnemyUnit(EnemyUnit enemyUnit, SpriteAnimation spriteAnimation)
 {
     EnemyUnit = enemyUnit;
     MovementAnimation = spriteAnimation;
 }
        private void AddEnemy(Point point)
        {
            var enemyUnit = new EnemyUnit(World, point, World.Player);
            enemyUnit.Life.Count = World.WorldState.LevelNumber;

            enemyUnit.Direction = UnitDirection.Left;
            enemyUnit.UserData = new VisualEnemyUnit(enemyUnit, Gfx.Instance.GetEnemyMovementAnimation());
            World.Enemies.Add(enemyUnit);
        }