Example #1
0
        public override void Act(KeyboardState kb, MouseState ms)
        {
            if (kb[Key.Escape])
            {
                CurrentWindow.SetWorld(new GameWorldStart());
                return;
            }
            Console.WriteLine("Maus ist im Fenser: " + CurrentWindow.IsMouseInWindow);

            CallerCube t = HelperIntersection.IsMouseCursorOnAny <CallerCube>(ms);

            if (t != null)
            {
                coloredItems.Add(t);
                t.SetGlow(1, 1, 0, 1);
            }
            foreach (GameObject g in GetGameObjects())
            {
                if (!coloredItems.Contains(g))
                {
                    g.SetGlow(0, 0, 0, 0);
                }
            }
            coloredItems.Clear();
        }