Page 13 - Orbit fb
        P. 13
      – U IN GAMEמדריך פיתוח משחק – Orbit
 צעד  – 6אוביקט הליכה על פלנטה  -שמאלה
        האוביקט ידע לנוע ימינה ושמאלה רק כאשרהוא על המעטפת של
                              הפלנטה .בתנועה שלו ישמור על מראה זקוף.
     רמז :דרוש ארוע לחיצה על מקש חץ שמאלה ופעולת הרצת קוד עם
                                                                    התוכן הבא:
circle_speed = 2
circle_radius = 130
)dir_now = point_direction(obj_planet.x,obj_planet.y,x,y
)dir_new = (dir_now + circle_speed + 360)mod(360
{ )if (place_meeting(x,y,obj_planet)==true
  x = lengthdir_x(circle_radius,dir_new) + obj_planet.x
  y = lengthdir_y(circle_radius,dir_new) + obj_planet.y
}
      בשלב זה כדאי להוסיף תנועה ימינה שדומה מאוד למנועה שמאלה
                                       - 13 -





