added entity support
This commit is contained in:
18
hGameTest/src/game/entities/BaseEntity.hx
Normal file
18
hGameTest/src/game/entities/BaseEntity.hx
Normal 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user