Skip to content

Commit 1c935fd

Browse files
committed
Revert "adding basic usage example"
This reverts commit 088e063.
1 parent 088e063 commit 1c935fd

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

Assets/BossRoom/Scripts/Server/Game/State/ServerBossRoomState.cs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
using System;
21
using System.Collections;
32
using System.Collections.Generic;
4-
using Unity.Multiplayer.Samples.BossRoom.Shared;
5-
using Unity.Multiplayer.Samples.BossRoom.Shared.Infrastructure;
63
using Unity.Netcode;
74
using UnityEngine;
85
using UnityEngine.Assertions;
@@ -47,28 +44,6 @@ public class ServerBossRoomState : GameStateBehaviour
4744
//the lifetime of the ServerBossRoomState).
4845
private List<ulong> m_HeroIds = new List<ulong>();
4946

50-
[Inject]
51-
void InjectDependencies(IPublisher<ApplicationController.test> pub, ISubscriber<ApplicationController.test> sub)
52-
{
53-
m_Publisher = pub;
54-
m_sub = sub.Subscribe(Test);
55-
}
56-
57-
void Test(ApplicationController.test test)
58-
{
59-
Debug.Log(test.a);
60-
Debug.Log(test.b);
61-
}
62-
63-
IPublisher<ApplicationController.test> m_Publisher;
64-
65-
IDisposable m_sub;
66-
67-
public override void OnDestroy()
68-
{
69-
m_sub.Dispose();
70-
}
71-
7247
public override void OnNetworkSpawn()
7348
{
7449
if (!IsServer)
@@ -229,7 +204,6 @@ private void SpawnPlayer(ulong clientId, bool lateJoin)
229204

230205
// spawn players characters with destroyWithScene = true
231206
newPlayer.SpawnWithOwnership(clientId, true);
232-
m_Publisher.Publish(new ApplicationController.test());
233207
}
234208

235209
static IEnumerator WaitToReposition(Transform moveTransform, Vector3 newPosition, Quaternion newRotation)

Assets/BossRoom/Scripts/Shared/ApplicationController.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ private void Awake()
5555
//buffered message channels hold the latest received message in buffer and pass to any new subscribers
5656
scope.BindBufferedMessageChannelInstance<LobbyListFetchedMessage>();
5757

58-
scope.BindNetworkedMessageChannelInstance<test>("test", sizeof(int) + sizeof(float));
59-
6058
//all the lobby service stuff, bound here so that it persists through scene loads
6159
scope.BindAsSingle<AuthenticationServiceFacade>(); //a manager entity that allows us to do anonymous authentication with unity services
6260
scope.BindAsSingle<LobbyServiceFacade>();
@@ -74,12 +72,6 @@ private void Awake()
7472
Application.targetFrameRate = 120;
7573
}
7674

77-
public struct test
78-
{
79-
public int a;
80-
public float b;
81-
}
82-
8375
private void Start()
8476
{
8577
SceneManager.LoadScene("MainMenu");

0 commit comments

Comments
 (0)