@@ -14,7 +14,7 @@ public class PlayerAgent : NetworkBehaviour
14
14
[ Rpc ( sources : RpcSources . InputAuthority , targets : RpcTargets . StateAuthority ) ]
15
15
public void RPC_SendMessage ( string message )
16
16
{
17
- if ( null != this . textMeshPro )
17
+ if ( this . textMeshPro != null )
18
18
{
19
19
this . textMeshPro . text = message ;
20
20
}
@@ -28,7 +28,7 @@ public static void OnChangedMessage(Changed<PlayerAgent> changed)
28
28
29
29
void ChangeMessage ( )
30
30
{
31
- if ( null != this . textMeshPro )
31
+ if ( this . textMeshPro != null )
32
32
{
33
33
this . textMeshPro . text = this . Message . Value ;
34
34
}
@@ -41,7 +41,7 @@ public static void OnChangedColor(Changed<PlayerAgent> changed)
41
41
42
42
void ChangedColor ( )
43
43
{
44
- if ( null != this . textMeshPro )
44
+ if ( this . textMeshPro != null )
45
45
{
46
46
this . textMeshPro . color = this . Color ;
47
47
}
@@ -51,7 +51,7 @@ internal void SetPlayerColor(Color color)
51
51
{
52
52
this . Color = color ;
53
53
this . Message = "Hi." ;
54
- if ( null != this . textMeshPro )
54
+ if ( this . textMeshPro != null )
55
55
{
56
56
this . textMeshPro . text = this . Message . Value ;
57
57
}
@@ -60,15 +60,15 @@ internal void SetPlayerColor(Color color)
60
60
public override void Spawned ( )
61
61
{
62
62
this . name = "[Network]PlayerAgent" ;
63
- if ( null == this . mainCamera )
63
+ if ( this . mainCamera == null )
64
64
{
65
65
this . mainCamera = GameObject . FindGameObjectWithTag ( "MainCamera" ) . transform ;
66
66
}
67
- if ( null != this . textMeshPro )
67
+ if ( this . textMeshPro != null )
68
68
{
69
69
this . textMeshPro . text = this . Message . Value ;
70
70
}
71
- if ( null != SceneContext . Instance . buttonSend )
71
+ if ( SceneContext . Instance . buttonSend != null )
72
72
{
73
73
SceneContext . Instance . buttonSend . onPressed += this . OnSend ;
74
74
}
@@ -80,9 +80,9 @@ void OnSend()
80
80
{
81
81
return ;
82
82
}
83
- if ( null != SceneContext . Instance . inputField )
83
+ if ( SceneContext . Instance . inputField != null )
84
84
{
85
- if ( null != this . textMeshPro )
85
+ if ( this . textMeshPro != null )
86
86
{
87
87
this . textMeshPro . text = SceneContext . Instance . inputField . text ;
88
88
}
0 commit comments