示例#1
0
        protected void ControlKeyPress(GameControlKeys controlKey, float strength)
        {
            //if (strength <= 0.0f)
            //    Log.Fatal("Intellect: ControlKeyPress: Invalid \"strength\"."); //Incin -- causing crash on mouse scroll down -120 example

            if (GetControlKeyStrength(controlKey) == strength)
            {
                return;
            }

            controlKeysStrength[(int)controlKey] = strength;

            if (controlledObject != null)
            {
                controlledObject.DoIntellectCommand(new Command(controlKey, true));
            }
        }
示例#2
0
        protected void ControlKeyPress(GameControlKeys controlKey, float strength)
        {
            if (strength <= 0.0f)
            {
                Log.Fatal("Intellect: ControlKeyPress: Invalid \"strength\".");
            }

            if (GetControlKeyStrength(controlKey) == strength)
            {
                return;
            }

            controlKeysStrength[(int)controlKey] = strength;

            if (controlledObject != null)
            {
                controlledObject.DoIntellectCommand(new Command(controlKey, true));
            }
        }