Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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();
     }
 }
Beispiel #3
0
    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();
    }