void OnPhotonCustomRoomPropertiesChanged(ExitGames.Client.Photon.Hashtable propertiesThatChanged) { foreach (DictionaryEntry entry in propertiesThatChanged) { Debug.Log("Prop change key = " + entry.Key + "--- Value = " + entry.Value); Debug.Log("Type of = " + entry.Key.GetType()); if (entry.Key.GetType() != typeof(System.String)) { return; } string key = (string)entry.Key; //entry.Key switch (key) { case RoomProperties.GameStage: GameState gameState = (GameState)entry.Value; GameManager.Instance.SetGameState(gameState); Debug.Log("Game State = " + gameState); break; case RoomProperties.Spots: int[] spots = (int[])entry.Value; GameManager.Instance.listSpots = spots; break; case RoomProperties.MaxFish: int maxFish = (int)entry.Value; break; default: //Fish if (key.Contains(RoomProperties.Fish)) { FishInfo fishInfo = FishInfo.ToFishInfo((string)entry.Value); //GameManager.Instance.AddFishInfo(fishInfo); } break; } } }
public void OnStart(bool startGame, string fishInfo) { //Debug.Log("Move2 show info = " + fishInfo + " - start game= " + startGame); this.FishInf = FishInfo.ToFishInfo(fishInfo); this.start_game = startGame; }