get entity names or sizes by eids or instances

This commit is contained in:
GameHerobrine 2022-09-25 00:49:56 +03:00
parent 53928f4e88
commit 69d4e52d44
12 changed files with 35 additions and 12 deletions

View file

@ -19,6 +19,7 @@ class PropertyEntity{
return $this->name;
}
}
class EntityList{
public function getEntities(){
return $this->entities;
@ -26,12 +27,12 @@ class EntityList{
public function addEntity(PropertyEntity $property){
$this->entities[$property->getEntityType()] = $property;
}
public function getEntityFromTypeAndClass($type, $class){
return isset($this->entities[$type]) && $this->entities[$type]->getEntityClass() === $class ? $this->entities[$type] : 0;
}
private $entities = [];
}
class EntityRegistry{
public static $entityList;
/*Register all entities*/