forked from noxious/server
18 lines
534 B
TypeScript
18 lines
534 B
TypeScript
import { Character } from '#entities/character'
|
|
|
|
class ZoneCharacter {
|
|
public readonly character: Character
|
|
public isMoving: boolean = false
|
|
public currentPath: Array<{ x: number; y: number }> | null = null
|
|
|
|
constructor(character: Character) {
|
|
this.character = character
|
|
}
|
|
|
|
public async savePosition() {
|
|
await this.character.setPositionX(this.character.positionX).setPositionY(this.character.positionY).setRotation(this.character.rotation).setZone(this.character.zone).update()
|
|
}
|
|
}
|
|
|
|
export default ZoneCharacter
|