public Enemy(Game game, UnitTypes.EnemyType enemyType) : base(game) { this.enemyType = enemyType; isHited = false; wanderMovesCount = 0; }
public Enemy(Game game, ContentManager content, GraphicsDeviceManager graphics, UnitTypes.EnemyType enemyType, Space space, Vector3 StartingPosition) : base(game, content, graphics) { tank.IsEnemy = true; this.enemyType = enemyType; this.space = space; rotate = Vector3.Zero; isHited = false; wanderMovesCount = 0; tank_box = new Sphere(StartingPosition, 35, 50);//new Box(StartingPosition, 60, 40, 70, 50); space.Add(tank_box); tank_box.Tag = this; tank_box.EventManager.InitialCollisionDetected += tankCollision; tank_box.CollisionRules.Group = EnemyTankCollisionGroup; this.game = game; Velocity = 2; tank.Velocity = 10; EnemyCannon = new EnemyCannon(game, tank,this); EnemyCannonBallManager = new EnemyCannonBallManager(game); game.Components.Add(EnemyCannonBallManager); randomWanderTarget = Vector3.Zero; MaxSteeringForce = 1000; WanderOn = true; ObstacleAvoidOn = true; ChasingOn = false; wallAvoidanceOn = true; Turn = false; FuzzyBrain = new FuzzyEngine(); SelectedTankParameters = FuzzyBrain.FuzzyParameters; }