import { Coord , Status } from "./wwa_data" ; export class Monster { constructor ( private _partsID , private _position , private _imgCoord , private _status , private _message , private _item , private _battleEndCallback ) { } get partsID ( ) : number { return this . _partsID ; } get position ( ) : Coord { return this . _position ; } get imgCoord ( ) : Coord { return this . _imgCoord ; } get status ( ) : Status { return this . _status ; } get message ( ) : string { return this . _message ; } get item ( ) : number { return this . _item ; } public damage ( amount ) { this . _status . energy = Math . max ( 0 , this . _status . energy - amount ) ; } public battleEndProcess ( ) { this . _battleEndCallback ( ) ; } }