This commit is contained in:
GameHerobrine 2023-01-06 00:59:30 +03:00
parent 60c8603c8b
commit d0ec32dc02
5 changed files with 22 additions and 16 deletions

View file

@ -18,8 +18,6 @@ class EntityAI
public $lastTask;
public $counter = 0;
public function __construct($entity){
$this->entity = $entity;
$this->tasks = [];
@ -49,9 +47,6 @@ class EntityAI
}
public function updateTasks(){
if($this->counter % 3 != 0){
return;
}
foreach($this->tasks as $t){
if(!$t->isStarted && $t->canBeExecuted($this)){
$t->isStarted = true;