public TryToChangeMainControlledUnit ( |
||
unit | ||
Résultat | void |
public void TryToChangeMainControlledUnit( Unit unit )
{
if( EntitySystemWorld.Instance.IsServer() || EntitySystemWorld.Instance.IsSingle() )
{
ServerOrSingle_ChangeMainControlledUnit( unit );
}
if( EntitySystemWorld.Instance.IsClientOnly() )
{
SendDataWriter writer = BeginNetworkMessage( typeof( PlayerIntellect ),
(ushort)NetworkMessages.ChangeMainControlledUnitToServer );
writer.WriteVariableUInt32( unit.NetworkUIN );
EndNetworkMessage();
}
}