mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
project uses tabs instead of spaces(as in CONTRIBUTING.md)
This commit is contained in:
parent
f00318b6ed
commit
62571f26cd
115 changed files with 2291 additions and 2364 deletions
|
|
@ -1,21 +1,21 @@
|
|||
<?php
|
||||
|
||||
abstract class Living extends Entity implements Damageable{
|
||||
public $target, $ai;
|
||||
public function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
||||
$this->target = false;
|
||||
$this->ai = new EntityAI($this);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->canBeAttacked = true;
|
||||
$this->hasGravity = true;
|
||||
$this->hasKnockback = true;
|
||||
}
|
||||
|
||||
public function update(){
|
||||
if($this->idleTime <= 0) {
|
||||
$this->ai->updateTasks();
|
||||
}
|
||||
parent::update();
|
||||
}
|
||||
|
||||
public $target, $ai;
|
||||
public function __construct(Level $level, $eid, $class, $type = 0, $data = array()){
|
||||
$this->target = false;
|
||||
$this->ai = new EntityAI($this);
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->canBeAttacked = true;
|
||||
$this->hasGravity = true;
|
||||
$this->hasKnockback = true;
|
||||
}
|
||||
|
||||
public function update(){
|
||||
if($this->idleTime <= 0) {
|
||||
$this->ai->updateTasks();
|
||||
}
|
||||
parent::update();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue