예제 #1
0
        public ButtonBehaviour()
        {
            this.button = this.CreateSignal("clicked");

            this.Enabled += ButtonBehaviour_Enabled;
            this.Disabled += ButtonBehaviour_Disabled;
        }
예제 #2
0
        public DoorBehaviour()
        {
            this.sigOpened = this.CreateSignal("opened");

            this.CreateSlot("open-close", this.Door_OpenClose);

            this.Enabled += DoorBehaviour_Enabled;
            this.Disabled += DoorBehaviour_Disabled;
            this.Updated += DoorBehaviour_Updated;
        }
예제 #3
0
 internal void ReceiveSignal(Signal sender)
 {
     if (this.SignalRecevied != null)
         this.SignalRecevied(this, EventArgs.Empty);
 }
예제 #4
0
 public void DisconnectFrom(Signal signal)
 {
     signal.Disconnect(this);
 }
예제 #5
0
 public void ConnectTo(Signal signal)
 {
     signal.Connect(this);
 }
예제 #6
0
 protected Signal CreateSignal(string name)
 {
     var signal = new Signal(this, name);
     this.signals.Add(signal.Name, signal);
     return signal;
 }