import Code.utils as utils from Code.stage import Stage from Code.player import Player from Code.stagemanager import StageManager from Code.dynamite import Dynamite from Code.explosion import Explosion def changeInt(integer): integer += 5 x = 10 print("{0:b}".format(x)) x = utils.clearBit(x, 4) print("{0:b}".format(x)) stage = Stage(sf.Vector2(7, 7), 48, os.path.dirname(__file__) + "/../Res/texture.png") stage.fromFile(utils.resPath("stage.txt")) print(os.path.dirname(__file__)) # stage.move(sf.Vector2(100, 100)) font = sf.Font.from_file(utils.resPath("opensans.ttf")) text = sf.Text() text.font = font text.character_size = 16 text.style = sf.Text.REGULAR text.position = sf.Vector2(350, 50)
def clearDynamite(self, dynamite): tile = self.stage.getTile(dynamite.tilePos) tile.bits = utils.clearBit(tile.bits, Tile.Bomb) self.stage.updateTileReg(tile)