67 lines
1.8 KiB
TypeScript
67 lines
1.8 KiB
TypeScript
import { Graphics, Container } from 'pixi.js';
|
|
import { JlGraphic, VectorText } from 'jl-graphic';
|
|
import { ITrainConstsConfig, EnumDiriveModel, EnumStatusText, UpdateTrainConsts, EnumTrainType, ITrainData } from './TrainConfig';
|
|
interface bodyWH {
|
|
width: number;
|
|
height: number;
|
|
}
|
|
declare class TrainHead extends Container {
|
|
arrow: Graphics;
|
|
pause: Graphics;
|
|
train: Train;
|
|
isStop: boolean;
|
|
arrowColor: string;
|
|
pauseColor: string;
|
|
constructor(train: Train);
|
|
clear(): void;
|
|
doRepaint(): void;
|
|
isRight(): boolean;
|
|
}
|
|
declare class TrainBody extends Container {
|
|
bodyRact: Graphics;
|
|
codeAGraph: VectorText;
|
|
codeBGraph: VectorText;
|
|
train: Train;
|
|
codeAColor: string;
|
|
codeBColor: string;
|
|
codeAText: string;
|
|
codeBText: string;
|
|
constructor(train: Train);
|
|
clear(): void;
|
|
getBodyWH(): bodyWH;
|
|
doRepaint(): void;
|
|
}
|
|
declare class StatusText extends Container {
|
|
sText: VectorText;
|
|
train: Train;
|
|
constructor(train: Train);
|
|
doRepaint(text: EnumStatusText, bodyWH: bodyWH): void;
|
|
clear(): void;
|
|
}
|
|
/**
|
|
* 列车
|
|
*/
|
|
export declare class Train extends JlGraphic {
|
|
static Type: string;
|
|
trainHead: TrainHead;
|
|
trainbody: TrainBody;
|
|
statusTextMap: Map<EnumStatusText, StatusText>;
|
|
isRightRoTop: boolean;
|
|
constDatas: ITrainConstsConfig;
|
|
constructor(data?: UpdateTrainConsts);
|
|
get datas(): ITrainData;
|
|
doRepaint(): void;
|
|
setIsStop(v: boolean): void;
|
|
setArrowVisible(v: boolean): void;
|
|
setPauseVisible(v: boolean): void;
|
|
run(): void;
|
|
stop(): void;
|
|
setCodeAText(v: string): void;
|
|
setCodeBText(v: string): void;
|
|
setDiriveModelColor(s: EnumDiriveModel): void;
|
|
setTrainTypeColor(s: EnumTrainType): void;
|
|
showStatus(s: EnumStatusText): void;
|
|
hideStatus(s: EnumStatusText): void;
|
|
}
|
|
export {};
|