File tree Expand file tree Collapse file tree 3 files changed +2
-10
lines changed
Assets/BossRoom/Scripts/Shared Expand file tree Collapse file tree 3 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,10 @@ private void Awake()
57
57
scope . BindMessageChannelInstance < DoorStateChangedEventMessage > ( ) ;
58
58
59
59
//this message channel is essential and persists for the lifetime of the lobby and relay services
60
- scope . BindNetworkedMessageChannelInstance < LifeStateChangedEventMessage > ( LifeStateChangedEventMessage . Size ) ;
60
+ scope . BindNetworkedMessageChannelInstance < LifeStateChangedEventMessage > ( ) ;
61
61
62
62
//this message channel is essential and persists for the lifetime of the lobby and relay services
63
- scope . BindNetworkedMessageChannelInstance < ConnectionEventMessage > ( ConnectionEventMessage . Size ) ;
63
+ scope . BindNetworkedMessageChannelInstance < ConnectionEventMessage > ( ) ;
64
64
65
65
//buffered message channels hold the latest received message in buffer and pass to any new subscribers
66
66
scope . BindBufferedMessageChannelInstance < LobbyListFetchedMessage > ( ) ;
Original file line number Diff line number Diff line change @@ -5,22 +5,16 @@ public struct LifeStateChangedEventMessage
5
5
public LifeState NewLifeState ;
6
6
public FixedPlayerName CharacterName ;
7
7
public CharacterTypeEnum CharacterType ;
8
-
9
- public static int Size => sizeof ( LifeState ) + FixedPlayerName . Size + sizeof ( CharacterTypeEnum ) ;
10
8
}
11
9
12
10
public struct DoorStateChangedEventMessage
13
11
{
14
12
public bool IsDoorOpen ;
15
-
16
- public static int Size => sizeof ( bool ) ;
17
13
}
18
14
19
15
public struct ConnectionEventMessage
20
16
{
21
17
public ConnectStatus ConnectStatus ;
22
18
public FixedPlayerName PlayerName ;
23
-
24
- public static int Size => sizeof ( ConnectStatus ) + FixedPlayerName . Size ;
25
19
}
26
20
}
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ public struct FixedPlayerName : INetworkSerializable
20
20
{
21
21
private FixedString32Bytes m_Name ;
22
22
23
- public static int Size => 32 ;
24
-
25
23
public void NetworkSerialize < T > ( BufferSerializer < T > serializer ) where T : IReaderWriter
26
24
{
27
25
serializer . SerializeValue ( ref m_Name ) ;
You can’t perform that action at this time.
0 commit comments