added input system to basic button; code cleanup;

This commit is contained in:
2018-11-08 23:49:42 -06:00
parent fcd2278796
commit 17e59397a5
4 changed files with 47 additions and 10 deletions

View File

@@ -11,11 +11,11 @@ using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
{
public delegate void ContentUpdate(String fileName, float completed);
public delegate void ContentSystemUpdate(String fileName, float completed);
public class ContentSystem
{
public event ContentUpdate UpdateEvent;
public event ContentSystemUpdate ContentSystemListeners;
Thread thread;
readonly ContentManager contentManager;
readonly Queue<LoadableContent> queue;
@@ -44,7 +44,6 @@ namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
Debug.WriteLine("Loaded asset: " + assetName);
}
public T Get<T>(string assetName)
{
lock (queue)
@@ -150,7 +149,7 @@ namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
protected virtual void OnProgress(string fileName, float progress)
{
UpdateEvent?.Invoke(fileName, progress);
ContentSystemListeners?.Invoke(fileName, progress);
}
public float Progress