public FrostOrb(Vector2 position, Texture2D texture, Creep targetCreep, int damage) : base(position, texture, targetCreep, damage) { speed = 5.0f; color = Color.White; radius = 128; slowedTimer = 4.0f; slowedModifier = 0.5f; targetPosition = targetCreep.GetPosition(); direction = targetCreep.GetPosition() - position; direction.Normalize(); List<Texture2D> frost = new List<Texture2D>(); frost.Add(TextureManager.p_FrostSmall); frost.Add(TextureManager.p_FrostLarge); particleEngine = new ParticleEngine(frost, new Vector2(800, 480)); }
private void CreateWave(double deltaTime, Creep creep, Creep boss) { if(waveCount <=9) { creepSpawnInterval -= deltaTime; if (waveCount <= 7 && creepSpawnInterval <= 0) { creepWave.Add(creep); creepSpawnInterval = creepSpawnIntervalReset; waveCount += 1; } else if (waveCount >= 8 && creepSpawnInterval <= 0) { creepWave.Add(boss); creepSpawnInterval = creepSpawnIntervalReset; waveCount += 1; } } if (waveCount == 10 && creepWave.Count == 0) { currentCreepWave = CreepWave.Countdown; waveCount = 0; waveEnded = true; } }
public Projectile(Vector2 position, Texture2D texture, Creep targetCreep, int damage) : base(position, texture) { this.targetCreep = targetCreep; this.damage = damage; }
public CannonBall(Vector2 position, Texture2D texture, Creep targetCreep, int damage) : base(position, texture, targetCreep, damage) { speed = 10.0f; color = Color.DarkGray; }