public TankModelFactory(World world, ITankTowerFactory tankTowerFactory) { if (world == null) throw new ArgumentNullException("world"); if (tankTowerFactory == null) throw new ArgumentNullException("tankTowerFactory"); _world = world; _tankTowerFactory = tankTowerFactory; }
public Tank(World world, Vector2 position, float rotation, ITankTowerFactory tankTowerFactory) { _world = world; _body = new Body(_world, position, rotation, BodyType.Dynamic) { FixedRotation = true, UserData = this }; FixtureFactory.AttachCircle(2.4f, 1, _body, Vector2.Zero); Tower = tankTowerFactory.Create(this); }