Exemplo n.º 1
0
        private void UpdateEditor()
        {
            _player.Send("DISABLE", false);
            var ms = InputProvider.MouseState;

            EntityManager.ClearEntities();
            VariableProvider.ScriptEngine.StopAllScripts();
            GameVariableProvider.Bosses.Clear();
            CodeManager <TileCode> .CheckCodes <Map <TileCode> >();

            if (ms.X > 0 && ms.Y > 0 && ms.X < 640 && ms.Y < 480)
            {
                if (ShortCuts.AreAnyKeysDown(new[] { Keys.LeftAlt, Keys.Space }) && InputMapper.LeftClick ||
                    ms.MiddleButton == ButtonState.Pressed)
                {
                    HandleCameraMovement(ms);
                }
                else
                {
                    HandleMouseActions(ms);
                }
            }
        }
Exemplo n.º 2
0
        public static bool TriggeredStrictAction(string name)
        {
            var keys = CustomActions[name].ToArray();

            return(ShortCuts.AreAnyKeysDown(keys, true));
        }