Ledger Nano X - The secure hardware wallet
SHARE
TWEET

idea

TungstenVn Apr 1st, 2020 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. m làm 2 class (delayed task)
  2. 1. dùng để tạo block, tham số là (x,y,z,level),tên là createBlock()
  3. 2 dùng để xóa block , tham số như trên removeBlock()
  4. -------------------------------------------------------------------------
  5. mỗi skill effect làm 1 class riêng (ko extend, implement gì cả)
  6. lúc nào gọi đến skill đó thì gọi class này, bên trong sẽ như thế này:
  7. class skillRắnCuộn {
  8.  
  9. $this->main->getScheduler()->scheduleDelayedTask(new createBlock($this, $x,$y,$z,$level), 1);
  10. $this->main->getScheduler()->scheduleDelayedTask(new createBlock($this, $x,$y+1,$z+1,$level), 5);
  11. $this->main->getScheduler()->scheduleDelayedTask(new createBlock($this, $x,$y+1,$z+3,$level), 10);
  12. $this->main->getScheduler()->scheduleDelayedTask(new createBlock($this, $x,$y,$z+2,$level), 15);
  13.  
  14. #sau 3 giây mỗi block bị xóa từ từ
  15. $this->main->getScheduler()->scheduleDelayedTask(new removeBlock($this, $x,$y,$z,$level), 61);
  16. $this->main->getScheduler()->scheduleDelayedTask(new removeBlock($this, $x,$y+1,$z+1,$level), 65);
  17. $this->main->getScheduler()->scheduleDelayedTask(new removeBlock($this, $x,$y+1,$z+3,$level), 70);
  18. $this->main->getScheduler()->scheduleDelayedTask(new removeBlock($this, $x,$y,$z+2,$level), 75);
  19. }
  20. như này thì dễ làm nhiều skill, dễ fix lỗi, nâng cấp skill,v.v
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top