當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Monster::spawnTo方法代碼示例

本文整理匯總了PHP中Monster::spawnTo方法的典型用法代碼示例。如果您正苦於以下問題:PHP Monster::spawnTo方法的具體用法?PHP Monster::spawnTo怎麽用?PHP Monster::spawnTo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Monster的用法示例。


在下文中一共展示了Monster::spawnTo方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: spawnTo

 public function spawnTo(Player $player)
 {
     $pk = $this->addEntityDataPacket($player);
     $pk->type = Creeper::NETWORK_ID;
     $player->dataPacket($pk);
     parent::spawnTo($player);
 }
開發者ID:Creeperface01,項目名稱:ImagicalMine,代碼行數:7,代碼來源:Creeper.php

示例2: spawnTo

 public function spawnTo(Player $player)
 {
     $pk = new AddMobPacket();
     $pk->eid = $this->getId();
     $pk->type = Zombie::NETWORK_ID;
     $pk->x = $this->x;
     $pk->y = $this->y;
     $pk->z = $this->z;
     $pk->yaw = $this->yaw;
     $pk->pitch = $this->pitch;
     $pk->metadata = $this->getData();
     $player->dataPacket($pk);
     $player->addEntityMotion($this->getId(), $this->motionX, $this->motionY, $this->motionZ);
     parent::spawnTo($player);
 }
開發者ID:rryy,項目名稱:PocketMine-MP,代碼行數:15,代碼來源:Zombie.php

示例3: spawnTo

 public function spawnTo(Player $player)
 {
     $pk = new AddEntityPacket();
     $pk->eid = $this->getId();
     $pk->type = Zombie::NETWORK_ID;
     $pk->x = $this->x;
     $pk->y = $this->y;
     $pk->z = $this->z;
     $pk->speedX = $this->motionX;
     $pk->speedY = $this->motionY;
     $pk->speedZ = $this->motionZ;
     $pk->yaw = $this->yaw;
     $pk->pitch = $this->pitch;
     $pk->metadata = $this->dataProperties;
     $player->dataPacket($pk);
     parent::spawnTo($player);
 }
開發者ID:owensel,項目名稱:PocketMine-0.13.0,代碼行數:17,代碼來源:Zombie.php

示例4: spawnTo

 public function spawnTo(Player $player)
 {
     $pk = new AddEntityPacket();
     $pk->eid = $this->getId();
     $pk->type = Blaze::NETWORK_ID;
     $pk->x = $this->x;
     $pk->y = $this->y + 2;
     $pk->z = $this->z;
     $pk->speedX = $this->motionX;
     $pk->speedY = $this->motionY;
     $pk->speedZ = $this->motionZ;
     $pk->yaw = $this->yaw;
     $pk->pitch = $this->pitch;
     $pk->metadata = $this->dataProperties;
     $player->dataPacket($pk->setChannel(Network::CHANNEL_ENTITY_SPAWNING));
     $player->addEntityMotion($this->getId(), $this->motionX, $this->motionY, $this->motionZ);
     parent::spawnTo($player);
 }
開發者ID:xpyctum,項目名稱:PocketMinePlusPlus,代碼行數:18,代碼來源:Blaze.php

示例5: spawnTo

 public function spawnTo(Player $player)
 {
     $pk = new AddEntityPacket();
     $pk->eid = $this->getId();
     $pk->type = PigZombie::NETWORK_ID;
     $pk->x = $this->x;
     $pk->y = $this->y;
     $pk->z = $this->z;
     $pk->speedX = $this->motionX;
     $pk->speedY = $this->motionY;
     $pk->speedZ = $this->motionZ;
     $pk->yaw = $this->yaw;
     $pk->pitch = $this->pitch;
     $pk->metadata = $this->dataProperties;
     $player->dataPacket($pk);
     parent::spawnTo($player);
     $pk = new MobEquipmentPacket();
     $pk->eid = $this->getId();
     $pk->item = new ItemItem(283);
     $pk->slot = 0;
     $pk->selectedSlot = 0;
     $player->dataPacket($pk);
 }
開發者ID:PepbookPvP,項目名稱:Genisys,代碼行數:23,代碼來源:PigZombie.php


注:本文中的Monster::spawnTo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。