-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds music and makes AI pathfinding a lot better.
- Loading branch information
Showing
7 changed files
with
77 additions
and
8 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Arch.Core; | ||
using Arch.Core.Extensions; | ||
using NovemberPirates.Components; | ||
using NovemberPirates.Extensions; | ||
using NovemberPirates.Systems; | ||
using NovemberPirates.Utilities; | ||
using Raylib_CsLo; | ||
|
||
namespace NovemberPirates.Scenes.Menus.Systems | ||
{ | ||
internal class MenuMusicSystem : GameSystem | ||
{ | ||
internal override void Update(World world) | ||
{ | ||
var singletonEntity = world.QueryFirst<Singleton>(); | ||
var singleton = singletonEntity.Get<Singleton>(); | ||
|
||
|
||
var music = AudioManager.Instance.GetMusic(singleton.Music); | ||
if (Raylib.IsMusicStreamPlaying(music)) | ||
{ | ||
Raylib.UpdateMusicStream(music); | ||
} | ||
else | ||
{ | ||
Raylib.PlayMusicStream(AudioManager.Instance.GetMusic(singleton.Music)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters