Android icon indicating copy to clipboard operation
Android copied to clipboard

Hsygdh

Open sthis9762-ship-it opened this issue 3 months ago • 1 comments

This issue is drafted for the itheima1/Android repository. Please provide additional context, requirements, or details to help clarify the problem or feature request you would like to address.

BattlegroundGame/ ├── Assets/ │ ├── Scripts/ │ │ └── PlayerController.cs │ │ └── Weapon.cs │ ├── Prefabs/ │ ├── Scenes/ │ │ └── MainScene.unity ├── Multiplayer/ │ └── NetworkManager.cs ├── UI/ │ └── LobbyUI.prefab

sthis9762-ship-it avatar Sep 28 '25 17:09 sthis9762-ship-it

using UnityEngine; using Photon.Pun; using Photon.Realtime;

public class Launcher : MonoBehaviourPunCallbacks { public void StartGame() { PhotonNetwork.ConnectUsingSettings(); }

public override void OnConnectedToMaster()
{
    PhotonNetwork.JoinOrCreateRoom("BattleRoom", new RoomOptions { MaxPlayers = 20 }, TypedLobby.Default);
}

public override void OnJoinedRoom()
{
    // spawn handled by GameManager (it will check OnJoinedRoom as well)
    GameManager.Instance.SpawnLocalPlayer();
}

}

sthis9762-ship-it avatar Sep 28 '25 17:09 sthis9762-ship-it