Skip to content

Hsygdh #10

Open
Open

Description

@sthis9762-ship-it

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

Activity

  1. sthis9762-ship-it commented on Sep 28, 2025

    @sthis9762-ship-it
    Author

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

    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions