Added vertical and horizontal collision detection to Entities

This commit is contained in:
Shoghi Cervantes
2014-11-04 12:23:42 +01:00
parent 32dae93ef9
commit cc7f12739d
3 changed files with 19 additions and 9 deletions

View File

@ -52,7 +52,7 @@ class Snowball extends Projectile{
$hasUpdate = parent::onUpdate($currentTick);
if($this->age > 1200 or $this->onGround){
if($this->age > 1200 or $this->isCollided){
$this->kill();
$hasUpdate = true;
}