Skip to content

Commit

Permalink
Merge commit 'b9a73145e4ce0c5c41b4732abaa726d9dd6a2eb0' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Google Automerger committed May 19, 2016
2 parents 4ff5db8 + b9a7314 commit 5616ffc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace NearbyDroids
using GooglePlayGames.BasicApi.Nearby;
using UnityEngine;
using UnityEngine.UI;

using UnityEngine.SceneManagement;
/// <summary>
/// Game manager manages the game play and players.
/// Heavily inspired by http://unity3d.com/learn/tutorials/projects/2d-roguelike
Expand Down Expand Up @@ -405,7 +405,7 @@ public void StartPlaying(GameType type)
}

// 1 is the game, 0 is the main menu
Application.LoadLevel(1);
SceneManager.LoadScene(1);
}

/// <summary>
Expand All @@ -424,7 +424,7 @@ public void StopPlaying()
}

// 0 is the main menu scene.
Application.LoadLevel(0);
SceneManager.LoadScene(0);
}

/// <summary>
Expand All @@ -437,7 +437,7 @@ public void StartNextLevel()
if (gameType == GameType.MultiplayerLocal ||
gameType == GameType.SinglePlayer)
{
Application.LoadLevel(Application.loadedLevel);
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
}

Expand Down Expand Up @@ -642,7 +642,7 @@ public void NotifyChanges()
internal void Update()
{
// if we are on the main menu, don't update.
if (Application.loadedLevel == 0)
if (SceneManager.GetActiveScene().buildIndex == 0)
{
return;
}
Expand Down Expand Up @@ -1006,4 +1006,4 @@ internal List<PlayerInfo.PlayerData> Players
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace NearbyDroids
{
using System.Collections.Generic;
using UnityEngine;

using UnityEngine.SceneManagement;
/// <summary>
/// Remote game manager. used to manage the game state for a player
/// that is not hosting the room.
Expand Down Expand Up @@ -73,7 +73,7 @@ internal void InitGame(GameManager.GameStateData data)
data.Level);
owner.GameState = data;
owner.LevelManager.DestroyBoard();
Application.LoadLevel(Application.loadedLevel);
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
return;
}

Expand Down

0 comments on commit 5616ffc

Please sign in to comment.