예제 #1
0
 public static void ChangeFrequency(
     int oldFrequency,
     int newFrequency,
     IRFObject obj,
     bool isListener,
     bool isOn = true)
 {
     newFrequency = RFManager.ClampFrequency(newFrequency);
     if (isListener)
     {
         RFManager.RemoveListener(oldFrequency, obj);
         if (!isOn)
         {
             return;
         }
         RFManager.AddListener(newFrequency, obj);
     }
     else
     {
         RFManager.RemoveBroadcaster(oldFrequency, obj);
         if (!isOn)
         {
             return;
         }
         RFManager.AddBroadcaster(newFrequency, obj);
     }
 }
예제 #2
0
 public override void ServerInit()
 {
     base.ServerInit();
     RFManager.AddListener(this.frequency, (IRFObject)this);
 }
예제 #3
0
 public override void Init()
 {
     base.Init();
     RFManager.AddListener(this.frequency, this);
 }