Step_0.gml 553 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. if x < 0
  2. {
  3. image_alpha -= 0.2;
  4. speed += 0.5;
  5. direction -= 2 * (direction - 180) + 180;
  6. }
  7. if x > 1920
  8. {
  9. image_alpha -= 0.2;
  10. speed += 0.5;
  11. direction -= 2 * (direction) + 180;
  12. }
  13. if y < 0
  14. {
  15. image_alpha -= 0.2;
  16. speed += 0.5;
  17. direction -= 2 * (direction - 90) + 180;
  18. }
  19. if y > 1080
  20. {
  21. image_alpha -= 0.2;
  22. speed += 0.5;
  23. direction -= 2 * (direction - 270) + 180;
  24. }
  25. //x = clamp(x, 0, 1920);
  26. //y = clamp(y, 0, 1080);
  27. direction += random_range(-3, 3);
  28. if !image_alpha
  29. instance_destroy();
  30. if image_index > 47
  31. {
  32. activate = false;
  33. image_speed = 1;
  34. }