private bool FindCollision(MouseEventArgs e, Trafficlight light)
        {
            if (e.X < light.X || e.Y < light.Y)
            {
                return(false);
            }
            if (e.X - light.X <= 16 && e.Y - light.Y <= 46)
            {
                return(true);
            }

            return(false);
        }
Beispiel #2
0
 public UpdateLightIntervalAction(float interval, Trafficlight light)
 {
     this.Light            = light;
     this.Interval         = interval;
     this.previousInterval = light.GreenSeconds;
 }