Finished level 5

This commit is contained in:
theo@manjaro 2021-11-27 19:18:25 +01:00
parent f6f31a42d9
commit 41ab3722fc
24 changed files with 22899 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

10949
gamedata/maps/Level 4/map.json Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

11934
gamedata/maps/Level 5/map.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1583,7 +1583,7 @@
{"x": 512, "y": 96},
{"x": 640, "y": 144}
],
"values": {"0": "Beginning;18", "1": "The Docks;18", "2": "Tiny Island;25"}
"values": {"0": "Beginning;18", "1": "The Docks;18", "2": "Tiny Island;25", "3": "Archipelago;32", "4": "Shipping Bridges;25", "5": "Cityscape;25"}
},
{"name": "Ripple", "id": 1, "_eid": "76589705", "x": 368, "y": 192, "originX": 0, "originY": 0},
{"name": "Ripple", "id": 2, "_eid": "76589705", "x": 224, "y": 176, "originX": 0, "originY": 0},

View File

@ -25,7 +25,8 @@ class GameLoop():
def delid(self,id):
# Supprime un objet à partir de son id
del(self.objects[id])
if id in self.objects.keys():
del(self.objects[id])
def delname(self,name):
# Supprimes les objet à partir d'un nom

View File

@ -17,6 +17,8 @@ class Balloon(Ennemy):
self.flip = False
self.autorespawn = self.game.lib.Timer(3)
self.canhit = False
def step(self):

View File

@ -13,10 +13,16 @@ class Crate(Ennemy):
self.rect[2],self.rect[3] = self.size
self.canhit = False
self.respawn = False
# Add his own rects to the solid list
self.collisionrects.append(self.rect)
self.game.globals["totaltrashes"]+=1
def deadtrigger(self):
self.game.globals["trashes"]+=1
def step(self):
super().step()
if self.dead:

View File

@ -13,6 +13,7 @@ class Ennemy(Movable):
self.respawnmargin = 30
self.respawn = True
self.autorespawn = False
self.dead = False
self.particleoffsetx = 0
@ -79,5 +80,9 @@ class Ennemy(Movable):
elif self.respawn:
if not self.onscreen:
self.dead = False
if self.autorespawn:
if self.autorespawn.tick(self.game.dt):
self.dead = False
self.autorespawn.reset()
else:
self.game.gameloop.delid(self.id)