public ColorChanger(Node parent = null)
 {
     //smartshifting = true;
     if (parent != null) this.parent = parent;
     colormode = ColorMode.hueShifter;
     inc = 1;
     phaseSpeed = 10;
     phasePercent = 100;
     schedulerModerated = false;
     msInterval = 20;
     useMsInterval = false;
     appt = new Appointment(managedUpdate, msInterval, infinite: true);
 }
Ejemplo n.º 2
0
 public static int Compare(Appointment a1, Appointment a2)
 {
     if (a1.scheduledTime < a2.scheduledTime) return -1;
     if (a1.scheduledTime > a2.scheduledTime) return 1;
     return 0;
 }
Ejemplo n.º 3
0
 public void RemoveAppointment(Appointment app)
 {
     //if (!appointments.Contains(app)) return;
     appointments.Remove(app);
     //appointments.OrderBy(a => a.scheduledTime);
 }
Ejemplo n.º 4
0
        public void doEveryXMilliseconds(Action<Node> action, int X, bool playSound = false)
        {
            if (playSound) start.Play();
            Action<Node> a = delegate(Node n) { action(n); };
            Appointment appt = new Appointment(a, X, infinite: true, playSound: playSound);

            AddAppointment(appt);
        }
Ejemplo n.º 5
0
 public void AddAppointment(Appointment app)
 {
     app.SetTimer();
     appointments.Add(app);
     SortAppointments();
 }