scale=150, double_sided=True) class Hand(Entity): def __init__(self): super().__init__(parent=camera.ui, model='assets/arm', texture=arm_texture, scale=0.2, rotation=Vec3(150, -10, 0), position=Vec2(0.4, -0.6)) def active(self): self.position = Vec2(0.3, -0.5) def passive(self): self.position = Vec2(0.4, -0.6) for z in range(20): for x in range(20): voxel = Voxel(position=(x, 0, z)) player = FirstPersonController() player.mouse_sensitivity = (40.0, 40.0) sky = Sky() hand = Hand() app.run()
# nameBlock='grass') # if y == size_y - 1: # [Block(model='cube', position=(x, i, y + 1), colorB=color.rgba(0, 0, 0, 0)) for i in range(heightOfTransparentBlocks)] # elif y == 0: # [Block(model='cube', position=(x, i, y - 1), colorB=color.rgba(0, 0, 0, 0)) for i in range(heightOfTransparentBlocks)] # if x == size_x - 1: # [Block(model='cube', position=(x + 1, i, y), colorB=color.rgba(0, 0, 0, 0)) for i in range(heightOfTransparentBlocks)] # elif x == 0: # [Block(model='cube', position=(x - 1, i, y), colorB=color.rgba(0, 0, 0, 0)) for i in range(heightOfTransparentBlocks)] inv = Inventory() inv.fillInv(order_blocks, textureListInv) player = FirstPersonController() cursorTexture = load_texture('data/texture/cursor.png') destroy(player.cursor) player.cursor = Entity(parent=camera.ui, model='quad', scale=.03, texture=cursorTexture, position_z=-0.01) player.position = (5, 0, 5) player.mouse_sensitivity = Vec2(50, 50) player.jump_duration = 0.25 player.jump_height = 1.5 file = listMap[0] # стандартная карта loadMapFromFile(file) hand = Hand() sky = Sky() fileName = 'data/map/' + genWorldName() app.run()