Exemplo n.º 1
0
        public void ToggleFollow()
        {
            Spotight spot = spotlights.Find(x => x.Follow);

            if (spot != null)
            {
                if (spot.Decline)
                {
                    spot.Rising  = true;
                    spot.Decline = false;
                    followMode   = true;
                }
                else
                {
                    spot.Rising  = false;
                    spot.Decline = true;
                    RemoveAll();
                    followMode = false;
                }
            }
            else
            {
                AddSpotlight(true);
                followMode = true;
            }
        }
Exemplo n.º 2
0
        public void AddSpotlight(bool follow)
        {
            var spotlight = new Spotight();

            spotlight.Rising     = true;
            spotlight.EventStart = DateTime.Now.Ticks;
            spotlight.X          = Mouse.GetState().X;
            spotlight.Y          = Mouse.GetState().Y;
            spotlight.Follow     = follow;
            spotlights.Add(spotlight);
        }