Files
game-of-life/utils/preload.py

12 lines
576 B
Python

import arcade.gui, arcade
from game.game_of_life import precompute_neighbor_masks
button_texture = arcade.gui.NinePatchTexture(64 // 4, 64 // 4, 64 // 4, 64 // 4, arcade.load_texture("assets/graphics/button.png"))
button_hovered_texture = arcade.gui.NinePatchTexture(64 // 4, 64 // 4, 64 // 4, 64 // 4, arcade.load_texture("assets/graphics/button_hovered.png"))
create_sound = arcade.Sound("assets/sound/create.mp3")
destroy_sound = arcade.Sound("assets/sound/destroy.mp3")
theme_sound = arcade.Sound("assets/sound/music.mp3")
NEIGHBOUR_MASKS = precompute_neighbor_masks()