Added alot of things, waypoints, grid for editor, game camera system, enemy moving on pre defined waypoint (path)
This commit is contained in:
+13
-1
@@ -11,6 +11,18 @@ def load_image(path, colorkey=(0,0,0)):
|
||||
|
||||
def load_images(dir_path):
|
||||
images = []
|
||||
for img_name in os.listdir(img_path+dir_path):
|
||||
for img_name in os.listdir(img_path + dir_path):
|
||||
images.append(load_image(dir_path + '/' + img_name))
|
||||
return images
|
||||
|
||||
def tile_to_pixel(waypoint, tile_size, center=False):
|
||||
if center:
|
||||
return (
|
||||
waypoint[0] * tile_size + tile_size // 2,
|
||||
waypoint[1] * tile_size + tile_size // 2
|
||||
)
|
||||
else:
|
||||
return (
|
||||
waypoint[0] * tile_size,
|
||||
waypoint[1] * tile_size
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user