49 lines
916 B
C#
49 lines
916 B
C#
using System;
|
|
|
|
using UnityEngine;
|
|
|
|
using GamecraftModdingAPI.Utility;
|
|
|
|
namespace GamecraftModdingAPI.App
|
|
{
|
|
public class Client
|
|
{
|
|
protected static AppEngine appEngine = new AppEngine();
|
|
|
|
public static event EventHandler<MenuEventArgs> EnterMenu
|
|
{
|
|
add => appEngine.EnterMenu += value;
|
|
remove => appEngine.EnterMenu -= value;
|
|
}
|
|
|
|
public static event EventHandler<MenuEventArgs> ExitMenu
|
|
{
|
|
add => appEngine.ExitMenu += value;
|
|
remove => appEngine.ExitMenu -= value;
|
|
}
|
|
|
|
public string Version
|
|
{
|
|
get => Application.version;
|
|
}
|
|
|
|
public string UnityVersion
|
|
{
|
|
get => Application.unityVersion;
|
|
}
|
|
|
|
public Game[] MyGames
|
|
{
|
|
get
|
|
{
|
|
if (!appEngine.IsInMenu) return new Game[0];
|
|
return appEngine.GetMyGames();
|
|
}
|
|
}
|
|
|
|
internal static void Init()
|
|
{
|
|
MenuEngineManager.AddMenuEngine(appEngine);
|
|
}
|
|
}
|
|
}
|