Water animations on map
BIN
gamedata/assets/ripple/0.png
Normal file
After Width: | Height: | Size: 675 B |
BIN
gamedata/assets/ripple/1.png
Normal file
After Width: | Height: | Size: 674 B |
BIN
gamedata/assets/ripple/10.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/11.
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/12.
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/2.png
Normal file
After Width: | Height: | Size: 690 B |
BIN
gamedata/assets/ripple/3.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/4.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/5.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/6.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/7.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/8.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
gamedata/assets/ripple/9.png
Normal file
After Width: | Height: | Size: 581 B |
@ -1584,7 +1584,15 @@
|
||||
{"x": 640, "y": 144}
|
||||
],
|
||||
"values": {"0": "Beginning;20", "1": "The Docks;40"}
|
||||
}
|
||||
},
|
||||
{"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},
|
||||
{"name": "Ripple", "id": 3, "_eid": "76589705", "x": 432, "y": 144, "originX": 0, "originY": 0},
|
||||
{"name": "Ripple", "id": 4, "_eid": "76589705", "x": 464, "y": 208, "originX": 0, "originY": 0},
|
||||
{"name": "Ripple", "id": 5, "_eid": "76589705", "x": 208, "y": 80, "originX": 0, "originY": 0},
|
||||
{"name": "Ripple", "id": 6, "_eid": "76589705", "x": 272, "y": 16, "originX": 0, "originY": 0},
|
||||
{"name": "Ripple", "id": 7, "_eid": "76589705", "x": 336, "y": 64, "originX": 0, "originY": 0},
|
||||
{"name": "Ripple", "id": 8, "_eid": "76589705", "x": 448, "y": 16, "originX": 0, "originY": 0}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -7,6 +7,7 @@ from gamedata.objects.ingame.ennemies.waterchange import WaterChange
|
||||
from gamedata.objects.ingame.ennemies.trashbag import TrashBag
|
||||
from gamedata.objects.ingame.endflag import EndFlag
|
||||
from gamedata.objects.levels import Levels
|
||||
from gamedata.objects.ripple import Ripple
|
||||
|
||||
class TilesetRenderer(BaseObject):
|
||||
|
||||
@ -77,7 +78,7 @@ class TilesetRenderer(BaseObject):
|
||||
self.layers = []
|
||||
self.spawns = []
|
||||
spawnlists = {"Spawns":self.spawns}
|
||||
ennemies = {"Robot":Robot,"Crate":Crate,"Balloon":Balloon,"Spring":Spring,"WaterChange":WaterChange,"Levels":Levels,"End":EndFlag,"TrashBag":TrashBag}
|
||||
ennemies = {"Robot":Robot,"Crate":Crate,"Balloon":Balloon,"Spring":Spring,"WaterChange":WaterChange,"Levels":Levels,"End":EndFlag,"TrashBag":TrashBag,"Ripple":Ripple}
|
||||
self.queue = [] # For spawning ennemies after beeing initialized
|
||||
if "layers" in json.keys() and type(json["layers"]).__name__=="list":
|
||||
solidlayer = False
|
||||
|
24
gamedata/objects/ripple.py
Normal file
@ -0,0 +1,24 @@
|
||||
from gamedata.objects.base import BaseObject
|
||||
|
||||
class Ripple(BaseObject):
|
||||
|
||||
def __init__(self,x,y,game,nodes,customvalues):
|
||||
|
||||
super().__init__(x,y,game)
|
||||
|
||||
self.sprites = self.game.getSpriteDir("ripple/")
|
||||
self.sprite = self.sprites[0]
|
||||
|
||||
self.rect[2],self.rect[3] = self.sprite.get_size()
|
||||
|
||||
self.spriteindex = game.lib.randint(0,len(self.sprites)-1)
|
||||
self.animspeed = 4
|
||||
|
||||
def step(self):
|
||||
|
||||
self.spriteindex+=self.animspeed*self.game.dt
|
||||
self.sprite = self.sprites[int(self.spriteindex)%len(self.sprites)]
|
||||
|
||||
def draw(self):
|
||||
|
||||
self.game.window.blit(self.sprite,[self.rect[0]-self.game.globals["camerax"],self.rect[1]-self.game.globals["cameray"]])
|