Created
May 12, 2014 22:07
-
-
Save kankikuchi/5309142bcc5ba4986156 to your computer and use it in GitHub Desktop.
Unity+photonでルームを作って入るまで
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start () | |
{ | |
//photonを利用するための初期設定 ロビーを作成して入る? | |
PhotonNetwork.ConnectUsingSettings("0.1"); | |
} | |
//PhotonNetwork.ConnectUsingSettingsを行うと呼ばれる | |
void OnJoinedLobby() | |
{ | |
//ランダムにルームに入る | |
PhotonNetwork.JoinRandomRoom(); | |
} | |
//ランダムにルームに入れなかった | |
void OnPhotonRandomJoinFailed() | |
{ | |
//部屋を自分で作って入る | |
PhotonNetwork.CreateRoom(null); | |
} | |
//ルームに入室成功 | |
void OnJoinedRoom() | |
{ | |
//キャラクター作成 | |
PlayerMake (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment