예제 #1
0
 public function canBeConsumedBy(Entity $entity)
 {
     return $entity instanceof Human and $entity->getFood() < $entity->getMaxFood();
 }
예제 #2
0
파일: Food.php 프로젝트: iTXTech/Genisys
 public function canBeConsumedBy(Entity $entity) : bool
 {
     return $entity instanceof Player and $entity->getFood() < $entity->getMaxFood() and $this->canBeConsumed();
 }