public void HandleInputChange(RoomInput.ChangedEvent e) { foreach (var c in Controllers) { c.HandleInputChange(e); } }
public override void HandleInputChange(RoomInput.ChangedEvent e) { base.HandleInputChange(e); var old = value; value += e.Input.On ? 1 : -1; value = Math.Max(0, value); if (old > 0 && value == 0) { foreach (var p in Room.Pistons) { p.Set(false); } } else if (old == 0 && value > 0) { foreach (var p in Room.Pistons) { p.Set(true); } } }
public override void HandleInputChange(RoomInput.ChangedEvent e) { base.HandleInputChange(e); CheckState(); }
public virtual void HandleInputChange(RoomInput.ChangedEvent e) { }
public override void HandleInputChange(RoomInput.ChangedEvent e) { base.HandleInputChange(e); on = !on; }