24 lines
479 B
Python
24 lines
479 B
Python
import os
|
|
|
|
from game.blocks.block import Block
|
|
from game.gameState import GameState
|
|
|
|
class SpikesBlock(Block):
|
|
@property
|
|
def character(self):
|
|
return '^'
|
|
|
|
@property
|
|
def type(self):
|
|
return 'spikes'
|
|
|
|
@property
|
|
def solid(self):
|
|
return False
|
|
|
|
def on_collision(self, gameState: GameState):
|
|
gameState.set_game_won(False)
|
|
gameState.set_stop_game(True)
|
|
|
|
def to_string(self):
|
|
return "🔥" |