コード例 #1
0
ファイル: Food.php プロジェクト: ClearSkyTeam/ClearSky
 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();
 }