Last active
May 17, 2020 12:15
-
-
Save PJZ9n/7c9608e66d664d954f38ed01688258c4 to your computer and use it in GitHub Desktop.
方角
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!$sender instanceof Player) { | |
return true; | |
} | |
$basePos = $sender->asVector3(); | |
$basePos = $basePos->add(0, 1, 0);//高さ上げ | |
switch ($sender->getDirection()) { | |
case 3: | |
$pos = $basePos->add(1, 0, 0); | |
break; | |
case 0: | |
$pos = $basePos->add(0, 0, 1); | |
break; | |
case 1: | |
$pos = $basePos->add(-1, 0, 0); | |
break; | |
case 2: | |
$pos = $basePos->add(0, 0, -1); | |
break; | |
} | |
$particle = new FloatingTextParticle($pos, "テキスト"); | |
$sender->getLevel()->addParticle($particle); | |
return false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment