Simple plateformer game playing
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
|
||||
from game.blocks.block import Block
|
||||
from game.gameState import GameState
|
||||
|
||||
class StoneBlock(Block):
|
||||
@property
|
||||
def character(self):
|
||||
return '#'
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return 'stone'
|
||||
|
||||
@property
|
||||
def solid(self):
|
||||
return True
|
||||
|
||||
def on_collision(self, gameState: GameState):
|
||||
# Stone blocks are solid, so the player cannot move through them.
|
||||
pass
|
||||
|
||||
def to_string(self):
|
||||
return "⬛"
|
||||
Reference in New Issue
Block a user