public static void StartExplosion(GameController game, MovableGameObject target, Type explosionType) { object[] parameters = new object[2]; parameters[0] = game; parameters[1] = target; Explosion explosion = (Explosion)Activator.CreateInstance(explosionType, parameters); }
public Weapon(GameController game, MovableGameObject holder) : base(game) { Holder = holder; Initialize(); projectileSpawnPoint = GetProjectileSpawnPoint(); OnPositionChanged += Weapon_OnPositionChanged; }
public Explosion(GameController game, MovableGameObject target) : base(game, target) { Initialize(); if (ParticleSize == 0) { ParticleSize = 7.5; } explosionParticles = GetExplosionParticles(); StartExplosion(); }
private static Explosion GetExplosionType(GameController game, MovableGameObject target, WeaponProjectile explosionSource) { Explosion explosionAnimation = null; Type projectileType = explosionSource.GetType(); if (projectileType == typeof(TankMachineGunBullet)) { explosionAnimation = new MediumExplosion(game, target); } else if (projectileType == typeof(TankMissileLauncherMissile)) { explosionAnimation = new BigExplosion(game, target); } return(explosionAnimation); }
public void RemoveGameObject(MovableGameObject obj) { PlayArea.Children.Remove(obj.Model); if (obj is Enemy) { enemies.Remove(obj as Enemy); } if (obj is IUpdate) { updatingObjects.Remove(obj as IUpdate); } if (obj is ICollidableGameObject) { collidableGameObjects.Remove(obj as ICollidableGameObject); } }
public TankBulletExplosion(GameController game, MovableGameObject target) : base(game, target) { }
public PathFollower(GameController game, MovableGameObject follower) { this.game = game; this.follower = follower; Initialize(); }
public TankMachineGun(GameController game, MovableGameObject holder) : base(game, holder) { }
public WaterTurretProjectileExplosion(GameController game, MovableGameObject target) : base(game, target) { }
public SmallExplosion(GameController game, MovableGameObject target) : base(game, target) { }
public static void StartExplosion(GameController game, MovableGameObject target, WeaponProjectile explosionSource) { Explosion explosionAnimation = GetExplosionType(game, target, explosionSource); explosionAnimation.Start(); }
public TankMissileLauncher(GameController game, MovableGameObject holder) : base(game, holder) { }