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; }
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); }
protected abstract void CopyValueTo(Syncable val);
protected abstract bool IsType(Syncable s);
protected virtual void ReceivedFromServer(Syncable current, ulong sender) { // A value has been received from the server CopyToInvoke(current); }
protected virtual void ReceivedFromClient(Syncable current, ulong sender) { // Client has requested a value current.SendTo(sender); }