void Start() { try { HostBridge.hostOnLauncherStarted(); } catch (EntryPointNotFoundException) { LaunchGame(testLoadParams); } }
public void OnGameCompleted() { try { HostBridge.Call(new WinGame()); HostBridge.hostWinGame(); } catch (EntryPointNotFoundException) { Debug.Log("Game won, but no host found so moving to next level"); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); } }
public void LeaveGame() { try { HostBridge.Call(new LeaveGame()); HostBridge.hostLeaveGame(); } catch (EntryPointNotFoundException) { // Nothing to do Debug.Log("Game quit, but no host found"); GameLoader.global.UnloadGame(); } }
void Awake() { if (!global) { global = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
void Start() { //var dog = new Dog(); //dog.name = "Indy"; //dog.owner = "Mark"; //string json = JsonUtility.ToJson(dog); //Debug.Log(json); //HostBridge.hostCallMethod("TestMethod", json); Debug.Log("Starting game manager"); HostBridge.Call(new OnGameStarted()); HostBridge.hostOnGameStarted(); }