Move PlayerEntity to AnimalEntity

This commit is contained in:
Ketchetwahmeegwun T. Southall 2022-01-29 22:39:11 -08:00
parent a8ce489af1
commit 37b0ace838

View File

@ -4,9 +4,11 @@ import { Entity } from "./Entity"
import { PuddleEntity } from './PuddleEntity'
import { WorldContext } from './World'
export class PlayerEntity extends Entity {
export class AnimalEntity extends Entity {
action?: Action
puddleTimer: number = 0
isPlayer: boolean = false
constructor(ctor: string) {
super(ctor)
}
@ -131,6 +133,6 @@ export class PlayerEntity extends Entity {
}
}
export function isPlayerEntity(o: any): o is PlayerEntity {
export function isAnimalEntity(o: any): o is AnimalEntity {
return o.act
}