public EnemyPatternNothing(Game game, int lifetime) { Game = game; EnemyFeatures = new EnemyFeatures { Lifetime = lifetime }; }
public EnemyPatternBombing(Game game, int enemyCount, EnemyFeatures features, Func <Enemy, ShootingPattern[]> shootingDirection) { Game = game; EnemyFeatures = features; this.enemyCount = enemyCount; this.shootingDirection = shootingDirection; }
//private readonly Func<Enemy, Vector[]> shootingDirection; public EnemyPatternExplosion(Game game, int enemyCount, int shootingFrequency, double bulletVelocity) { Game = game; EnemyFeatures = new EnemyFeatures { BulletVelocity = bulletVelocity, EnemyVelocity = 2, Lifetime = 150, ShootingFrequency = shootingFrequency }; this.enemyCount = enemyCount; }
public BossFight(Game game, EnemyFeatures features, Point start, int hp) { Game = game; EnemyFeatures = features; EnemyFeatures.Boss = new Boss(start, Game, VectorMoves.BossMoves(new Vector(start)), EnemyFeatures.EnemyVelocity, EnemyFeatures.BulletVelocity) { HP = hp, }; this.start = start; breakLen = 200; phaseCount = 5; }
public EnemyPatternDiagonal(Game game, Point leftStart, Point rightStart) { Game = game; this.leftStart = leftStart; this.rightStart = rightStart; EnemyFeatures = new EnemyFeatures { BulletVelocity = 3, EnemyVelocity = 4, Lifetime = 250, ShootingFrequency = 20, SpawnFrequency = 20 }; }
public EnemyPatternHalfCircle( Point leftStart, Point rightStart, Game game, Func <Enemy, ShootingPattern[]> shootingDirection) { this.leftStart = leftStart; this.rightStart = rightStart; Game = game; EnemyFeatures = new EnemyFeatures { BulletVelocity = 5, EnemyVelocity = 3, Lifetime = 500, ShootingFrequency = 50, SpawnFrequency = 20 }; this.shootingDirection = shootingDirection; }
public Dialog(Game game, DialogInfo info, string[] playerPhrases, string[] bossPhrases) { Game = game; var count = 0; boss = new Boss(info.BossSpawnPoint, game, VectorMoves.MoveToTarget(new Vector(info.BossSpawnPoint), new Vector(info.BossStartPoint)), 1, 1, true) { Name = info.BossName, HP = 10 }; Phrases = new Queue <Tuple <ICharacter, string, string> >(playerPhrases .Zip(bossPhrases, (x, y) => x + "\r" + y) .SelectMany(x => x.Split('\r')) .ToList() .Select(x => Tuple.Create( ++count % 2 == 0 ? (ICharacter)boss : (ICharacter)game.Player, count % 2 == 0 ? boss.Name : game.Player.Name, x))); phraseLifetime = 200; EnemyFeatures = new EnemyFeatures { Lifetime = Phrases.Count * phraseLifetime }; }