Added camera entity (why?)

This commit is contained in:
ArkQuark 2022-11-03 22:13:52 +03:00
parent 291ff42920
commit bdf7a88999
3 changed files with 19 additions and 0 deletions

View file

@ -17,6 +17,7 @@ class Painting extends Hanging{
[PAINTING, 0, 1]
];
}
public function spawn($player){
$pk = new AddPaintingPacket;
$pk->eid = $this->eid;

View file

@ -0,0 +1,18 @@
<?php
class TripodCamera extends Entity{
const TYPE = OBJECT_TRIPOD_CAMERA;
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
parent::__construct($level, $eid, $class, $type, $data);
$this->setHealth(PHP_INT_MAX, "generic");
}
public function interactWith(Entity $e, $action){
if($e->isPlayer() and $action === InteractPacket::ACTION_HOLD){
//todo
$this->server->schedule(40, [$this, "close"]);
}
parent::interactWith($e, $action);
}
}