created Invisible Block
parent
6a2614ec77
commit
8972a01028
|
@ -13,6 +13,19 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "invisible",
|
||||
"subsheets": [
|
||||
{
|
||||
"id": "1",
|
||||
"delays": [
|
||||
1
|
||||
],
|
||||
"width": 12,
|
||||
"height": 12
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "goal_door",
|
||||
"subsheets": [
|
||||
|
|
|
@ -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.InvisibleElement import InvisibleElement
|
||||
from level.elements.static.VacuumCleanerElement import VacuumCleanerElement
|
||||
from level.elements.static.GoalDoorReceiverLevelElement import GoalDoorReceiverLevelElement
|
||||
from level.elements.static.SpikeLevelElement import SpikeLevelElement
|
||||
|
@ -42,7 +43,8 @@ TILES = {
|
|||
'<': SpikeLevelElement,
|
||||
'>': SpikeLevelElement,
|
||||
|
||||
'A': VacuumCleanerElement
|
||||
'A': VacuumCleanerElement,
|
||||
'i': InvisibleElement
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
from level.Level import Level
|
||||
from level.elements.static.StaticLevelElement import StaticLevelElement
|
||||
from physics.SpriteManager import SpriteManager
|
||||
from sprite.SpritesheetManager import SpritesheetManager
|
||||
|
||||
|
||||
class InvisibleElement(StaticLevelElement):
|
||||
def load(self, sprite_manager: SpriteManager, spritesheet_manager: SpritesheetManager, level: Level):
|
||||
self.spritesheet = spritesheet_manager.get_sheet('invisible')
|
||||
self.set_animation_state('1')
|
||||
self.position_scale.position = self.tile['position']
|
|
@ -12,7 +12,8 @@ BLOCK_TYPES = {
|
|||
'l': 'block_left',
|
||||
'r': 'block_right',
|
||||
'~': 'block_top_left',
|
||||
'|': 'block_top_right'
|
||||
'|': 'block_top_right',
|
||||
'i': 'invisible'
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue