This commit is contained in:
honmono
2022-03-21 17:27:37 +08:00
commit 91e741a895
320 changed files with 42373 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
export enum Direction {
Up,
Down,
Left,
Right
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "436daff0-c505-45e0-b0ea-d804b6ef7fac",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,59 @@
export enum EventType {
Stand,
Run,
Attack,
Hurt,
HPChange,
Death
}
export class EventBase {
type: EventType;
constructor(type:number) {
this.type = type;
}
}
export class EventStand extends EventBase {
constructor() {
super(EventType.Stand);
}
}
export class EventRun extends EventBase {
constructor() {
super(EventType.Run);
}
}
export class EventAttack extends EventBase {
constructor() {
super(EventType.Attack);
}
}
export class EventHurt extends EventBase {
constructor() {
super(EventType.Hurt);
}
}
export class EventDeath extends EventBase {
callback: Function;
constructor(cb: Function) {
super(EventType.Death);
this.callback = cb;
}
}
export class EventHPChange extends EventBase {
public lastHP: number;
public nowHP: number;
public maxHP: number;
constructor(maxHP: number, lastHP: number, nowHP: number) {
super(EventType.HPChange);
this.maxHP = maxHP;
this.lastHP = lastHP;
this.nowHP = nowHP;
}
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "8bdaf2f1-e01a-449c-88ab-e35aa4741b9c",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}