Advertisement
Guest User

Reflection Shot

a guest
Jul 27th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. task Reflect(refshot){
  2. while(!Obj_IsDeleted(refshot)) {
  3.  
  4. if(ObjMove_GetX(refshot)<0) {
  5. ObjMove_SetAngle(refshot, 180 - ObjMove_GetAngle(refshot) );
  6. ObjMove_SetX(refshot, ObjMove_GetX(refshot) + 0.1);
  7. }
  8.  
  9. if(ObjMove_GetX(refshot)>GetStgFrameWidth) {
  10. ObjMove_SetAngle(refshot, 180 - ObjMove_GetAngle(refshot) );
  11. ObjMove_SetX(refshot, ObjMove_GetX(refshot) - 0.1);
  12. }
  13. if(ObjMove_GetY(refshot)<0) {
  14. ObjMove_SetAngle(refshot, 0 - ObjMove_GetAngle(refshot) );
  15. ObjMove_SetY(refshot, ObjMove_GetY(refshot) + 0.1);
  16. }
  17. if(ObjMove_GetY(refshot)>GetStgFrameHeight) {
  18. ObjMove_SetAngle(refshot, 0 - ObjMove_GetAngle(refshot) );
  19. ObjMove_SetY(refshot, ObjMove_GetY(refshot) - 0.1);
  20. }
  21. yield;
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement