コード例 #1
0
    public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId)
    {
        int        playerIndex = GameManger.GetInstance().GetPlayerFill();
        GameObject player      = Instantiate(playerPrefab);

        GameManger.GetInstance().size[playerIndex]++;
        GameManger.GetInstance().UI.OnPlayerSizeChanged(SyncListInt.Operation.OP_DIRTY, playerIndex);
        NetworkServer.AddPlayerForConnection(conn, player, playerControllerId);
    }
コード例 #2
0
    public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId)
    {
        GameObject player = Instantiate(playerPrefab);

        player.gameObject.GetComponent <Ctrl.LocalPlayerManeger>().playerNum = GameManger.GetInstance().GetPlayerFill();

        GameManger.GetInstance().size[player.gameObject.GetComponent <Ctrl.LocalPlayerManeger>().playerNum]++;
        GameManger.GetInstance().UI.OnPlayerSizeChanged(SyncListInt.Operation.OP_DIRTY, player.gameObject.GetComponent <Ctrl.LocalPlayerManeger>().playerNum);
        NetworkServer.AddPlayerForConnection(conn, player, playerControllerId);
    }
コード例 #3
0
    public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId)
    {
        int        playerIndex = GameManger.GetInstance().GetPlayerFill();
        GameObject player      = Instantiate(playerPrefab);

        GameManger.GetInstance().size[playerIndex]++;
        GameManger.GetInstance().UI.OnPlayerSizeChanged(SyncListInt.Operation.OP_DIRTY, playerIndex);
        NetworkServer.AddPlayerForConnection(conn, player, playerControllerId);

        //クライアントのプレイヤーナンバーをカードデータに代入
        player.gameObject.GetComponent <Ctrl.BldgData_Maneger>().useCardData.PlayerNum = playerIndex;
    }
コード例 #4
0
ファイル: UIGameManger.cs プロジェクト: KoudaiTsuji/B-POP
 public void OnPlayerSizeChanged(SyncListInt.Operation op, int index)
 {
     PlayerSize[index].value = GameManger.GetInstance().size[index];
 }
コード例 #5
0
 public void OnPlayerSizeChanged(SyncListInt.Operation op, int index)
 {
     Log.Write("dasdas dsaasdasd");
     PlayerSize[index].value = GameManger.GetInstance().size[index];
 }