invite fixed
This commit is contained in:
@@ -55,6 +55,7 @@ public class invitePlayer : NetworkBehaviour
|
||||
private void OnMouseDown() //clicking on collider
|
||||
//ToDo exclude owner
|
||||
{
|
||||
Debug.Log("OnMouseDown on invitePlayer " + GetComponent<playerNetwork>().playerName);
|
||||
ShowInviteUI();
|
||||
}
|
||||
|
||||
|
||||
@@ -215,11 +215,11 @@ public class playerNetwork : NetworkBehaviour
|
||||
}
|
||||
void Start(){
|
||||
|
||||
// for(int i =0; i < 2000; i+=10){
|
||||
// int level = GetLevelByXp(i);
|
||||
// int xp = GetXpForLevel(level);
|
||||
// Debug.Log($"{i} : {level} : {xp}");
|
||||
// }
|
||||
#if UNITY_EDITOR
|
||||
if(isServer){
|
||||
playerName = "Player" + Random.Range(0, 100);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!isLocalPlayer){
|
||||
canvas.SetActive(false);
|
||||
@@ -245,8 +245,11 @@ public class playerNetwork : NetworkBehaviour
|
||||
RpcBroadcastCharJson(CharacterSelection.selectedCharJson);
|
||||
}
|
||||
else{
|
||||
CmdSetName(gplayAuth.userNameCloud);
|
||||
|
||||
if(gplayAuth.userNameCloud.Length > 0){
|
||||
CmdSetName(gplayAuth.userNameCloud);
|
||||
}else{
|
||||
CmdSetName("Player" + Random.Range(0, 100));
|
||||
}
|
||||
CmdSetCharJson(CharacterSelection.selectedCharJson);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user