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,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#
|
||||
#,#,>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#
|
||||
#,#,>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,C,,,#
|
||||
#,#,>,,,,,,,,,,,,,,,,,,,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,S,S,S,S,S,S,S,S,+,+,+,+,+,+,+,+,+,#
|
||||
#,#,>,,,,,,,,,,,,,,,,,,,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#
|
||||
#,#,>,,,,,,,,,,,,,,,,,,,,,#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#
|
||||
#,#,>,,,,,,,,,,,,,,,,,,,,,#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#
|
||||
#,#,,,,,,,,,,,,,,,,,,,,,,G,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#
|
||||
#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#
|
||||
#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#
|
||||
|
|
|
Binary file not shown.
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 103 KiB |
Binary file not shown.
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 984 B |
|
@ -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.SpikeLevelElement import SpikeLevelElement
|
||||
from level.elements.static.ButtonInputLevelElement import ButtonInputLevelElement
|
||||
from level.elements.static.GateReceiverLevelElement import GateReceiverLevelElement
|
||||
from level.elements.LevelElement import LevelElement
|
||||
|
@ -29,6 +30,11 @@ TILES = {
|
|||
|
||||
'M': PushableBoxLevelElement,
|
||||
'q': BouncingBallLevelElement,
|
||||
|
||||
'S': SpikeLevelElement,
|
||||
's': SpikeLevelElement,
|
||||
'<': SpikeLevelElement,
|
||||
'>': SpikeLevelElement
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
from level.Level import Level
|
||||
from level.elements.static.StaticLevelElement import StaticLevelElement
|
||||
from physics.SpriteManager import SpriteManager
|
||||
from sprite.SpritesheetManager import SpritesheetManager
|
||||
|
||||
BLOCK_TYPES = {
|
||||
'S': 'small_spike_up',
|
||||
's': 'small_spike_down',
|
||||
'<': 'small_spike_left',
|
||||
'>': 'small_spike_right'
|
||||
}
|
||||
|
||||
class SpikeLevelElement(StaticLevelElement):
|
||||
|
||||
def __init__(self, tile: dict, loaded_level):
|
||||
super().__init__(tile, loaded_level)
|
||||
|
||||
def load(self, sprite_manager: SpriteManager, spritesheet_manager: SpritesheetManager, level: Level):
|
||||
block_type = BLOCK_TYPES[self.tile['name']]
|
||||
|
||||
self.spritesheet = spritesheet_manager.get_sheet(block_type)
|
||||
self.set_animation_state('1')
|
||||
self.position_scale.position = self.tile['position']
|
Loading…
Reference in New Issue