From 37b0ace838b9d21175d7a36bf3b2d6a76e3d43b8 Mon Sep 17 00:00:00 2001 From: kts of kettek Date: Sat, 29 Jan 2022 22:39:11 -0800 Subject: [PATCH] Move PlayerEntity to AnimalEntity --- Engine/src/live/{PlayerEntity.ts => AnimalEntity.ts} | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename Engine/src/live/{PlayerEntity.ts => AnimalEntity.ts} (96%) diff --git a/Engine/src/live/PlayerEntity.ts b/Engine/src/live/AnimalEntity.ts similarity index 96% rename from Engine/src/live/PlayerEntity.ts rename to Engine/src/live/AnimalEntity.ts index 47a1c0f..9b1debf 100644 --- a/Engine/src/live/PlayerEntity.ts +++ b/Engine/src/live/AnimalEntity.ts @@ -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 }