Skip to content

Commit

Permalink
Cleanup unused classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostya Stankevych committed Mar 11, 2016
1 parent 9695a36 commit e217639
Show file tree
Hide file tree
Showing 58 changed files with 482 additions and 4,616 deletions.
3 changes: 2 additions & 1 deletion API/Controllers/Store/StoreController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 118,8 @@ public void SimulateRemoveAdsPurchase()
{
APIManager.Instance.State.RemoveAds();
APIManager.Instance.BannerAds.DisableAds();
DataManager.Instance.Save();
// TODO: use event here instead
//DataManager.Instance.Save();
if (OnDisableAds != null)
OnDisableAds();
}
Expand Down
28 changes: 22 additions & 6 deletions AppController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 2,32 @@
using System.Collections;
using Zedarus.ToolKit.API;
using Zedarus.ToolKit.Data;
using Zedarus.ToolKit.Data.Player;
using Zedarus.Toolkit.Data.Game;

namespace Zedarus.ToolKit
{
public class AppController : MonoBehaviour
public class AppController<GameDataClass, PlayerDataClass> : SimpleSingleton<AppController<GameDataClass, PlayerDataClass>>
where GameDataClass : GameData where PlayerDataClass : PlayerData
{
#region Properties
static private bool initialized = false;
private DataManager<GameDataClass, PlayerDataClass> _data;
#endregion

#region Unity Methods
private void Start()
public static void Start()
{
CreateInstance();
}

public AppController()
{
if (!initialized)
Init();

Launch();
Destroy(gameObject);
//Destroy(gameObject);
}
#endregion

Expand Down Expand Up @@ -47,24 56,31 @@ protected virtual void InitAPI()

protected virtual void InitGameData()
{

_data = new DataManager<GameDataClass, PlayerDataClass>();
}

protected virtual void InitPlayerData(string filename, APIState customAPIState = null)
{
DataManager.Instance.Load(filename);
/*DataManager.Instance.Load(filename);
if (customAPIState == null)
{
DataManager.Instance.Player.AddModel<APIState>();
customAPIState = DataManager.Instance.Player.GetModel<APIState>();
}
APIManager.Instance.UseState(customAPIState);
APIManager.Instance.UseState(customAPIState);*/
}

protected virtual void Launch()
{

}
#endregion

#region Getters
public DataManager<GameDataClass, PlayerDataClass> Data
{
get { return _data; }
}
#endregion
}
}
313 changes: 0 additions & 313 deletions Audio/AudioManager.cs

This file was deleted.

Loading

0 comments on commit e217639

Please sign in to comment.