Move PlayerEntity to AnimalEntity
This commit is contained in:
parent
a8ce489af1
commit
37b0ace838
|
@ -4,9 +4,11 @@ import { Entity } from "./Entity"
|
||||||
import { PuddleEntity } from './PuddleEntity'
|
import { PuddleEntity } from './PuddleEntity'
|
||||||
import { WorldContext } from './World'
|
import { WorldContext } from './World'
|
||||||
|
|
||||||
export class PlayerEntity extends Entity {
|
export class AnimalEntity extends Entity {
|
||||||
action?: Action
|
action?: Action
|
||||||
puddleTimer: number = 0
|
puddleTimer: number = 0
|
||||||
|
isPlayer: boolean = false
|
||||||
|
|
||||||
constructor(ctor: string) {
|
constructor(ctor: string) {
|
||||||
super(ctor)
|
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
|
return o.act
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user