Advertisement
Guest User

hh

a guest
May 31st, 2014
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 KB | None | 0 0
  1. // tornado centre bubble bullet
  2. task balloonBullet(obj,x,y,v,dir) {
  3.     ObjShot_Regist(obj);
  4.     ObjMove_SetPosition(obj,x,y);
  5.     ObjRender_SetPosition(obj,x,y,0);
  6.     ObjMove_SetAngle(obj,90);
  7.     ObjMove_SetSpeed(obj,1);
  8.     ObjShot_SetGraphic(obj,230);
  9.     ObjShot_SetDelay(obj,0);
  10.    
  11.     while(!Obj_IsDeleted(obj)) {
  12.         ObjText_SetText(b1,ObjMove_GetY(obj));
  13.         yield;
  14.     }
  15. }
  16.  
  17. // Inside the floor obj while loop
  18. while(! Obj_IsDeleted(obj)) {
  19.         if(IsIntersected_Line_Circle(ObjRender_GetX(obj)-128,   // xpos begin rectangle
  20.         ObjRender_GetY(obj)-64,                 // ypos begin rectangle
  21.         ObjRender_GetX(obj)+128,                // xpos end rectangle
  22.         ObjRender_GetY(obj)+64,                 // ypos end rectangle
  23.         8,                          // size of rectangle
  24.         ObjMove_GetX(balloonObj),               // xpos of balloon
  25.         ObjMove_GetY(balloonObj),               // ypos of balloon
  26.         8)                          // radius of smoke part collision
  27.         )           {                                                                  
  28. ObjText_SetText(b2,"yes");                                      ObjMove_SetSpeed(balloonObj,0);                                
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement