Änderungen
This commit is contained in:
1 parent
9d1ebda660
commit
60dc7cfd31
2 files changed
+7
-7
No files matched your search
@@ -6,7 +6,7 @@ from game import Game
|
||||
EARTH_RADIUS = 30
|
||||
MOON_RADIUS = 10
|
||||
MOON_DISTANCE = 100.0
|
||||
MOON_ANGLE = 0.01
|
||||
theta = 0.01
|
||||
|
||||
BLACK = (0, 0, 0)
|
||||
BLUE = (0, 0, 255)
|
||||
@@ -17,14 +17,14 @@ class Moon(Game):
|
||||
"""Der Mond kreist um die Erde."""
|
||||
|
||||
def __init__(self, title="Moon", fps=60, size=(640, 400)):
|
||||
super().__init__(title, fps, size)
|
||||
super().__init__(title, fps, size) # Ruft Konstruktor von Game auf
|
||||
self.center_x = size[0] // 2
|
||||
self.center_y = size[1] // 2
|
||||
self.center_y = size[1] // 2 # Center position von Erde
|
||||
self.init_positions()
|
||||
|
||||
def init_positions(self):
|
||||
self.position_moon = (MOON_DISTANCE, 0.0)
|
||||
self.rot_moon = rot_2D(MOON_ANGLE)
|
||||
self.rot_moon = rot_2D(theta)
|
||||
|
||||
def rotate_point(self, position, rotation):
|
||||
result = matmul(rotation, [[position[0]], [position[1]]])
|
||||
|
||||
Reference in new issue
Block a user