Skip to content
Snippets Groups Projects
Commit b7f59555 authored by radow's avatar radow
Browse files

added music

parent 5deacce4
No related branches found
No related tags found
No related merge requests found
File added
......@@ -7,6 +7,7 @@ pub mod config;
mod tile;
mod combat_log;
use tetra::audio::Sound;
use tetra::{Context, State};
use tetra::graphics::{self, Color, DrawParams, Texture};
use tetra::input::{self, Key};
......@@ -38,6 +39,9 @@ impl GameState {
let font = VectorFontBuilder::new("./resources/corbel.ttf")?.with_size(ctx, 16.0);
let huge = VectorFontBuilder::new("./resources/corbel.ttf")?.with_size(ctx, 50.0);
let background_music = Sound::new("./resources/music.mp3")?;
background_music.repeat(ctx);
if textures.is_ok() {
if font.is_ok() && huge.is_ok() {
Ok(GameState {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment