invite fixed

This commit is contained in:
2025-06-09 00:25:34 +05:30
parent 476d016df6
commit 2fddc4b1cd
8 changed files with 180 additions and 149 deletions

View File

@@ -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();
}

View File

@@ -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);
}
}