Small renaming
This commit is contained in:
parent
5cffb1680c
commit
98733dc94b
|
@ -5,12 +5,12 @@ module SpaceTac.Game.AI {
|
|||
// Combination of a move action and a fire action
|
||||
export class BullyManeuver {
|
||||
// Move action to position the ship before firing
|
||||
move: AIManeuver;
|
||||
move: Maneuver;
|
||||
|
||||
// Fire action
|
||||
fire: AIManeuver;
|
||||
fire: Maneuver;
|
||||
|
||||
constructor(move: AIManeuver = null, fire: AIManeuver = null) {
|
||||
constructor(move: Maneuver = null, fire: Maneuver = null) {
|
||||
this.move = move;
|
||||
this.fire = fire;
|
||||
}
|
||||
|
@ -123,9 +123,9 @@ module SpaceTac.Game.AI {
|
|||
} else {
|
||||
var result = new BullyManeuver();
|
||||
if (move) {
|
||||
result.move = new AIManeuver(this.ship, engine, move);
|
||||
result.move = new Maneuver(this.ship, engine, move);
|
||||
}
|
||||
result.fire = new AIManeuver(this.ship, weapon, target);
|
||||
result.fire = new Maneuver(this.ship, weapon, target);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ module SpaceTac.Game.AI {
|
|||
|
||||
// Ship maneuver for an artifical intelligence
|
||||
// A maneuver is like a human player action, choosing an equipment and using it
|
||||
export class AIManeuver {
|
||||
export class Maneuver {
|
||||
// Concerned ship
|
||||
ship: Ship;
|
||||
|
17
src/scripts/game/ai/ManeuverSequence.ts
Normal file
17
src/scripts/game/ai/ManeuverSequence.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
module SpaceTac.Game.AI {
|
||||
"use strict";
|
||||
|
||||
// A chain of Maneuver to execute sequentially
|
||||
export class ManeuverChain {
|
||||
// Concerned ship
|
||||
ship: Ship;
|
||||
|
||||
// Sequence of maneuvers
|
||||
maneuvers: Maneuver[];
|
||||
|
||||
constructor(ship: Ship, maneuvers: Maneuver[]) {
|
||||
this.ship = ship;
|
||||
this.maneuvers = maneuvers;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue