Exemple #1
0
 def __init__(self, player):
     self.platform = Tile.Platform()
     self.player = player
     self.inCollisionDown = False
     self.plat = Mapper.get_platforms()
Exemple #2
0
from Tiles import Tile
import copy

platform = Tile.Platform()
torch = Tile.Torch()
background = Tile.Background()
crate = Tile.Crate()
meme_crate = Tile.MemeCrate()

current_object = None

hex_dict = {
    "#0026FF": platform,
    "#FF6A00": torch,
    "#FFFFFF": background,
    "#FFD800": crate,
    "#00FF21": meme_crate
}


def init_empty_obj(hex_val, x, y):
    temp = copy.copy(hex_dict.get(hex_val))
    temp.set_pos(x, y)
    return temp


def get_object(hex_val, x, y):
    temp = hex_dict[hex_val]
    temp.set_pos(x, y)
    return temp