public ButtonBehaviour() { this.button = this.CreateSignal("clicked"); this.Enabled += ButtonBehaviour_Enabled; this.Disabled += ButtonBehaviour_Disabled; }
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; }
internal void ReceiveSignal(Signal sender) { if (this.SignalRecevied != null) this.SignalRecevied(this, EventArgs.Empty); }
public void DisconnectFrom(Signal signal) { signal.Disconnect(this); }
public void ConnectTo(Signal signal) { signal.Connect(this); }
protected Signal CreateSignal(string name) { var signal = new Signal(this, name); this.signals.Add(signal.Name, signal); return signal; }