1
0
Fork 0
spacetac/src/app/game/events/BaseLogEvent.ts

26 lines
604 B
TypeScript
Raw Normal View History

2015-03-03 00:00:00 +00:00
/// <reference path="../Serializable.ts"/>
module SpaceTac.Game {
2015-01-07 00:00:00 +00:00
"use strict";
2014-12-31 00:00:00 +00:00
// Base class for a BattleLog event
2015-03-03 00:00:00 +00:00
export class BaseLogEvent extends Serializable {
2014-12-31 00:00:00 +00:00
// Code of the event (its type)
code: string;
// The ship causing the event (the one whose turn it is to play)
ship: Ship;
// Target of the event
target: Target;
constructor(code: string, ship: Ship = null, target: Target = null) {
2015-03-03 00:00:00 +00:00
super();
2014-12-31 00:00:00 +00:00
this.code = code;
this.ship = ship;
this.target = target;
}
}
2015-01-07 00:00:00 +00:00
}