protected override void CopyValueTo(Syncable s)
        {
            SyncableProjectorState ps = (SyncableProjectorState)s;

            ps._state = _state;
            ps.Timer  = Timer;
        }
        protected override void CopyValueTo(Syncable val)
        {
            SyncableProjectorSettings s = (SyncableProjectorSettings)val;

            s._speed     = _speed;
            s._looseArea = _looseArea;
        }
예제 #3
0
 protected void CopyToInvoke(Syncable current)
 {
     CopyValueTo(current);
     if (current.OnValueReceived != null)
     {
         current.OnValueReceived.Invoke();
     }
 }
 protected override void ReceivedFromClient(Syncable current, ulong sender)
 {
     if (_speed <= 0)
     {
         current.SendTo(sender);
     }
     else
     {
         CopyToInvoke(current);
         SendToOthers();
     }
 }
 protected override bool IsType(Syncable s)
 {
     return(s is SyncableProjectorState);
 }
 protected override bool IsType(Syncable s)
 {
     return(s is SyncableProjectorSettings);
 }
예제 #7
0
 protected abstract void CopyValueTo(Syncable val);
예제 #8
0
 protected abstract bool IsType(Syncable s);
예제 #9
0
 protected virtual void ReceivedFromServer(Syncable current, ulong sender)
 {
     // A value has been received from the server
     CopyToInvoke(current);
 }
예제 #10
0
 protected virtual void ReceivedFromClient(Syncable current, ulong sender)
 {
     // Client has requested a value
     current.SendTo(sender);
 }