serverBuild

This commit is contained in:
Nim-XD
2025-06-10 23:57:03 +05:30
parent b6dfa0721e
commit 9b23d57c41
20 changed files with 12836 additions and 16 deletions

View File

@@ -132,12 +132,14 @@ public class invitePlayer : NetworkBehaviour
if (ownerName.Length == 0)
{
inPartyUI.SetActive(false);
charPartyText.text = "";
charPartyUI.SetActive(false);
}
else
{
inPartyUI.SetActive(true);
inPartyOwnerNameTxt.text = $"{ownerName}'s Party";
inPartyOwnerNameTxt.text = charPartyText.text;
charPartyText.text = $"in {ownerName}'s party";
charPartyUI.SetActive(true);
playerNetwork[] players = FindObjectsOfType<playerNetwork>();
@@ -154,9 +156,9 @@ public class invitePlayer : NetworkBehaviour
}
public void LeaveParty(){
//playerNetwork.localPlayer.CmdLeaveParty();
playerNetwork.localPlayer.CmdLeaveParty();
inPartyUI.SetActive(false);
charPartyUI.SetActive(false);
charPartyText.text = "";
// charPartyUI.SetActive(false);
// charPartyText.text = "";
}
}

View File

@@ -281,6 +281,12 @@ public class playerNetwork : NetworkBehaviour
[Command]
public void CmdAcceptInvite(string otherPlayerName){
myPartyOwner = otherPlayerName;
Debug.Log("Invite accepted: " + myPartyOwner);
}
[Command]
public void CmdLeaveParty(){
myPartyOwner = null;
}
playerNetwork FindPlayerByName(string playerName){
@@ -447,6 +453,7 @@ public class playerNetwork : NetworkBehaviour
invitePlayer.InParty(myPartyOwner);
}else{
invitePlayer.InParty("");
}
}
ShowXP();