示例#1
0
 public void tick(CreationData cd)
 {
     if (synapse.Synapse == cd.Synapse)
     {
         synapse.getState(false).Change += cd.Step;
     }
     else
     {
         synapse.getState(true).Change += cd.Step;
     }
 }
示例#2
0
        protected override void mouseMove(object sender, MouseEventArgs e)
        {
            if (shift != null)
            {
                base.mouseMove(sender, e);
                return;
            }

            if (active != null)
            {
                if (active.active(e.Location))
                {
                    return;
                }

                if (mapHistory.ContainsKey(active))
                {
                    mapHistory[active].hide();
                }

                active = null;
                time   = 0;
                return;
            }

            foreach (CreatedSynapse synapse in synapses)
            {
                AnimatedSynapse s = synapse.Synapse;

                if (s.active(e.Location, false))
                {
                    active = s.getState(false);
                    return;
                }

                if (s.isDuplex() && s.active(e.Location, true))
                {
                    active = s.getState(true);
                    return;
                }
            }
        }