@@ -47,7 +47,7 @@ protected NetworkedObject networkedObject
47
47
}
48
48
}
49
49
private NetworkedObject _networkedObject = null ;
50
- public uint objectNetworkId
50
+ public uint networkId
51
51
{
52
52
get
53
53
{
@@ -66,14 +66,14 @@ public int ownerClientId
66
66
//Change data type
67
67
private Dictionary < string , int > registeredMessageHandlers = new Dictionary < string , int > ( ) ;
68
68
69
- public int RegisterMessageHandler ( string name , Action < int , byte [ ] > action )
69
+ protected int RegisterMessageHandler ( string name , Action < int , byte [ ] > action )
70
70
{
71
71
int counter = MessageManager . AddIncomingMessageHandler ( name , action ) ;
72
72
registeredMessageHandlers . Add ( name , counter ) ;
73
73
return counter ;
74
74
}
75
75
76
- public void DeregisterMessageHandler ( string name , int counter )
76
+ protected void DeregisterMessageHandler ( string name , int counter )
77
77
{
78
78
MessageManager . RemoveIncomingMessageHandler ( name , counter ) ;
79
79
}
@@ -86,7 +86,7 @@ private void OnDestroy()
86
86
}
87
87
}
88
88
89
- public void SendToServer ( string messageType , string channelName , byte [ ] data )
89
+ protected void SendToServer ( string messageType , string channelName , byte [ ] data )
90
90
{
91
91
if ( isServer )
92
92
{
@@ -98,7 +98,7 @@ public void SendToServer(string messageType, string channelName, byte[] data)
98
98
}
99
99
}
100
100
101
- public void SendToLocalClient ( string messageType , string channelName , byte [ ] data )
101
+ protected void SendToLocalClient ( string messageType , string channelName , byte [ ] data )
102
102
{
103
103
if ( ! isServer )
104
104
{
@@ -108,7 +108,7 @@ public void SendToLocalClient(string messageType, string channelName, byte[] dat
108
108
NetworkingManager . singleton . Send ( ownerClientId , messageType , channelName , data ) ;
109
109
}
110
110
111
- public void SendToNonLocalClients ( string messageType , string channelName , byte [ ] data )
111
+ protected void SendToNonLocalClients ( string messageType , string channelName , byte [ ] data )
112
112
{
113
113
if ( ! isServer )
114
114
{
@@ -118,7 +118,7 @@ public void SendToNonLocalClients(string messageType, string channelName, byte[]
118
118
NetworkingManager . singleton . Send ( messageType , channelName , data , ownerClientId ) ;
119
119
}
120
120
121
- public void SendToClient ( int clientId , string messageType , string channelName , byte [ ] data )
121
+ protected void SendToClient ( int clientId , string messageType , string channelName , byte [ ] data )
122
122
{
123
123
if ( ! isServer )
124
124
{
@@ -128,7 +128,7 @@ public void SendToClient(int clientId, string messageType, string channelName, b
128
128
NetworkingManager . singleton . Send ( clientId , messageType , channelName , data ) ;
129
129
}
130
130
131
- public void SendToClients ( int [ ] clientIds , string messageType , string channelName , byte [ ] data )
131
+ protected void SendToClients ( int [ ] clientIds , string messageType , string channelName , byte [ ] data )
132
132
{
133
133
if ( ! isServer )
134
134
{
@@ -138,7 +138,7 @@ public void SendToClients(int[] clientIds, string messageType, string channelNam
138
138
NetworkingManager . singleton . Send ( clientIds , messageType , channelName , data ) ;
139
139
}
140
140
141
- public void SendToClients ( List < int > clientIds , string messageType , string channelName , byte [ ] data )
141
+ protected void SendToClients ( List < int > clientIds , string messageType , string channelName , byte [ ] data )
142
142
{
143
143
if ( ! isServer )
144
144
{
@@ -148,7 +148,7 @@ public void SendToClients(List<int> clientIds, string messageType, string channe
148
148
NetworkingManager . singleton . Send ( clientIds , messageType , channelName , data ) ;
149
149
}
150
150
151
- public void SendToClients ( string messageType , string channelName , byte [ ] data )
151
+ protected void SendToClients ( string messageType , string channelName , byte [ ] data )
152
152
{
153
153
if ( ! isServer )
154
154
{
@@ -158,7 +158,7 @@ public void SendToClients(string messageType, string channelName, byte[] data)
158
158
NetworkingManager . singleton . Send ( messageType , channelName , data ) ;
159
159
}
160
160
161
- public NetworkedObject GetNetworkedObject ( uint networkId )
161
+ protected NetworkedObject GetNetworkedObject ( uint networkId )
162
162
{
163
163
return SpawnManager . spawnedObjects [ networkId ] ;
164
164
}
0 commit comments