public MovableEntity(GameState gameState, LevelInfo aLevelInfo, Model3D aModel, Path aPath, int uid, float spd, float rad, int maxh, int maxw, float waterSuckAmt, int waterRadius) { levelInfo = aLevelInfo; this.model = aModel; path = aPath; uniqueID = uid; speed = spd; radius = rad; maxHealth = maxh; health = maxh; maxWater = maxw; water = 0; this.waterSuckAmt = waterSuckAmt; this.waterRadius = waterRadius; position = path.getPosition(); prevPosition = path.getPosition(); hasMoved = true; waiting = 0; heading = new Vector3((float)Math.Cos(uid), (float)Math.Sin(uid), 0); normal = levelInfo.getNormal(position.X, position.Y); orientation = Matrix.Identity; setOrientation(); selected = false; infoBar = new InfoBox(gameState); pathTool = new LineTool(gameState.getGraphics()); ringTool = new LineTool(gameState.getGraphics()); ringTool.setColor(new Vector3(1.0f, 0.0f, 0.0f)); rebuildRing(); }
public Guard(GameState gameState, LevelInfo levelInfo, ModelLoader modelLoader, Path path, int uid, ProjectileManager proj) : base(gameState, levelInfo, modelLoader.getModel3D(modelType.Tank), path, uid, SPEED, RADIUS, FULL_HEALTH, WATER_CAPACITY, 0, 0) { attackRadiusTool = new LineTool(gameState.getGraphics()); attackRadiusTool.setColor(Color.Green.ToVector3()); attackTarget = null; projectiles = proj; }