added entity support

This commit is contained in:
2021-03-13 04:10:27 +01:00
parent fbc3be26e4
commit 132a9d63c0
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package game.entities;
class BaseEntity{
public static var entities:Array<BaseEntity> = [];
public function new(){
entities.push(this);
}
public function think(){
}
public static function dothink(){
for(entity in entities){
entity.think();
}
}
}