Jumping is now possible with spacebar

main
Erenando 2023-03-29 15:19:37 +02:00
parent 63bf820faf
commit 1964a81027
3 changed files with 27 additions and 3 deletions

View File

@ -128,6 +128,26 @@
}
]
},
{"id": "staubsauger",
"subsheets": [
{
"id": "on",
"delays":[
1,1,1,1,1,1,1,1
],
"width": 48,
"height": 36
},
{
"id": "off",
"delays": [
20
],
"width": 48,
"height": 36
}
]
},
{
"id": "temp_blocks",
"subsheets": [

View File

@ -3,6 +3,7 @@ from typing import Optional
from level.Level import Level
from level.elements.dynamic.BouncingBallLevelElement import BouncingBallLevelElement
from level.elements.dynamic.PushableBoxLevelElement import PushableBoxLevelElement
from level.elements.static.VacuumCleanerElement import VacuumCleanerElement
from level.elements.static.GoalDoorReceiverLevelElement import GoalDoorReceiverLevelElement
from level.elements.static.SpikeLevelElement import SpikeLevelElement
from level.elements.static.ButtonInputLevelElement import ButtonInputLevelElement
@ -39,7 +40,9 @@ TILES = {
'S': SpikeLevelElement,
's': SpikeLevelElement,
'<': SpikeLevelElement,
'>': SpikeLevelElement
'>': SpikeLevelElement,
'A': VacuumCleanerElement
}

View File

@ -7,7 +7,7 @@ BLOCK_TYPES = {
'A': 'staubsauger'
}
class SpikeLevelElement(StaticLevelElement):
class VacuumCleanerElement(StaticLevelElement):
def __init__(self, tile: dict, loaded_level):
super().__init__(tile, loaded_level)
@ -16,5 +16,6 @@ class SpikeLevelElement(StaticLevelElement):
block_type = BLOCK_TYPES[self.tile['name']]
self.spritesheet = spritesheet_manager.get_sheet(block_type)
self.set_animation_state('1')
self.set_animation_state('on')
self.position_scale.position = self.tile['position']