1
0
Fork 0
spacetac/src/core/missions/MissionPart.ts

52 lines
1.1 KiB
TypeScript
Raw Normal View History

module TS.SpaceTac {
/**
* An abstract part of a mission, describing the goal
*/
export class MissionPart {
2017-06-29 17:25:38 +00:00
// Link to mission
mission: Mission
// Very short description
title: string
2017-06-29 17:25:38 +00:00
constructor(mission: Mission, title: string) {
this.mission = mission;
this.title = title;
}
2017-06-29 17:25:38 +00:00
get universe(): Universe {
return this.mission.universe;
}
get fleet(): Fleet {
return this.mission.fleet;
}
/**
* Abstract checking if the part is completed
*/
2017-06-29 17:25:38 +00:00
checkCompleted(): boolean {
return false;
}
2017-06-29 17:25:38 +00:00
/**
* Force the part as completed
*
* This is a cheat, and should enforce the part conditions
*/
forceComplete(): void {
}
2017-07-02 18:21:04 +00:00
/**
* Event called when the part starts
*/
onStarted(): void {
}
/**
* Event called when the part ends
*/
onEnded(): void {
}
}
}