コード例 #1
0
    public override bool GetButtonUp(MappedButton button)
    {
        var MouseMapping    = MappedInput.Mouse.GetButtonUp(button);
        var KeyboardMapping = MappedInput.KeyBoard.GetButtonUp(button);

        return(MouseMapping || KeyboardMapping);
    }
コード例 #2
0
    public override Sprite GetButtonIcon(MappedButton button)
    {
        var KeyboardMapping = MappedInput.KeyBoard.GetButtonIcon(button);
        var MouseMapping    = MappedInput.Mouse.GetButtonIcon(button);

        return(MouseMapping ?? KeyboardMapping);
    }
コード例 #3
0
	public override string GetButtonName(MappedButton button)
	{
		var mapping = MappedInput.instance.keyboardInputMapping.GetButtonMapping (button);
		if (mapping == null)
			return "";

		return mapping.buttons[0].ToString();
	}
コード例 #4
0
	public override bool GetButton(MappedButton button)
	{
		var mapping = MappedInput.instance.mouseInputMapping.GetButtonMapping (button);
		if (mapping != null)
		{
			return Input.GetMouseButton (mapping.mouseButtonId);
		}
		return false;
	}
コード例 #5
0
    public override string GetButtonName(MappedButton button)
    {
        var MouseMapping    = MappedInput.Mouse.GetButtonName(button);
        var KeyboardMapping = MappedInput.KeyBoard.GetButtonName(button);

        var mapping = MouseMapping != "" ? MouseMapping : KeyboardMapping;

        return(mapping);
    }
コード例 #6
0
	public ButtonMapping GetButtonMapping(MappedButton target)
	{
		for (int i = 0; i < buttonMappings.Count; i++)
		{
			if( buttonMappings[i].target == target )
				return buttonMappings[i];
		}

		return null;
	}
コード例 #7
0
	public ButtonMapping GetButtonMapping(MappedButton target)
	{
		for (int i = 0; i < keyboardButtonMapping.Count; i++)
		{
			if( keyboardButtonMapping[i].target == target )
				return keyboardButtonMapping[i];
		}
		
		return null;
	}
コード例 #8
0
    public override bool GetButton(MappedButton button)
    {
        var mapping = MappedInput.Instance.MouseInputMapping.GetButtonMapping(button);

        if (mapping != null)
        {
            return(Input.GetMouseButton(mapping.mouseButtonId));
        }
        return(false);
    }
コード例 #9
0
	public override string GetButtonName(MappedButton button)
	{
		var mapping = MappedInput.instance.gamepadInputMapping.GetGamepadButtonMapping (button);
		if( mapping != null )
		{
			return gamepad.layout.GetButtonName(mapping.buttons[0]);
		}

		return "";
	}
コード例 #10
0
	public override string GetButtonName(MappedButton button)
	{
		var mapping = MappedInput.instance.mouseInputMapping.GetButtonMapping (button);
		if (mapping != null)
		{
			return string.Format ("Mouse Button {0}", mapping.mouseButtonId);
		}
			
		return "";
	}
    public override Sprite GetButtonIcon(MappedButton button)
    {
        var mapping = MappedInput.Instance.KeyboardInputMapping.GetKeyboardButtonMapping(button);

        if (mapping != null && mapping.buttons.Length > 0)
        {
            return(MappedInput.Instance.KeyboardInputMapping.IconMappings.GetKeyboardButtonIconMapping(mapping.buttons[0]).Icon);
        }
        return(null);
    }
コード例 #12
0
    public override string GetButtonName(MappedButton button)
    {
        var mapping = MappedInput.Instance.MouseInputMapping.GetButtonMapping(button);

        if (mapping != null)
        {
            return(string.Format("Mouse Button {0}", mapping.mouseButtonId));
        }

        return("");
    }
コード例 #13
0
    public override string GetButtonName(MappedButton button)
    {
        var mapping = MappedInput.instance.gamepadInputMapping.GetGamepadButtonMapping(button);

        if (mapping != null)
        {
            return(gamepad.layout.GetButtonName(mapping.buttons[0]));
        }

        return("");
    }
コード例 #14
0
    public override string GetButtonName(MappedButton button)
    {
        var mapping = MappedInput.instance.keyboardInputMapping.GetButtonMapping(button);

        if (mapping == null)
        {
            return("");
        }

        return(mapping.buttons[0].ToString());
    }
コード例 #15
0
    public ButtonMapping GetButtonMapping(MappedButton target)
    {
        for (int i = 0; i < keyboardButtonMapping.Count; i++)
        {
            if (keyboardButtonMapping[i].target == target)
            {
                return(keyboardButtonMapping[i]);
            }
        }

        return(null);
    }
コード例 #16
0
    public ButtonMapping GetMouseButtonMapping(MappedButton target)
    {
        for (int i = 0; i < mouseButtonMappings.Count; i++)
        {
            if (mouseButtonMappings[i].target == target)
            {
                return(mouseButtonMappings[i]);
            }
        }

        return(null);
    }
コード例 #17
0
    public ButtonMapping GetGamepadButtonMapping(MappedButton target)
    {
        for (int i = 0; i < buttonMappings.Count; i++)
        {
            if (buttonMappings[i].target == target)
            {
                return(buttonMappings[i]);
            }
        }

        return(null);
    }
コード例 #18
0
	public override bool GetButton(MappedButton button)
	{
		var mapping = MappedInput.instance.gamepadInputMapping.GetGamepadButtonMapping (button);
		if (mapping != null)
		{
			for (int i = 0; i < mapping.buttons.Length; i++)
			{
				if (gamepad.GetButton (mapping.buttons [i]))
					return true;
			}
		}
		return false;
	}
    public override Sprite GetButtonIcon(MappedButton button)
    {
        var mapping = MappedInput.Instance.GamepadInputMapping.GetGamepadButtonMapping(button);

        if (mapping == null || mapping.buttons.Length == 0)
        {
            return(null);
        }

        var IconMapping = MappedInput.Instance.GamepadInputMapping.IconMapping.GetGamepadButtonIconMapping(mapping.buttons[0]);

        return(IconMapping == null ? null : IconMapping.Icon);
    }
コード例 #20
0
	public override bool GetButtonUp(MappedButton button)
	{
		var mapping = MappedInput.instance.keyboardInputMapping.GetButtonMapping (button);
		if (mapping == null)
			return false;
		
		for(int i = 0; i < mapping.buttons.Length; i++)
		{
			if( Input.GetKeyUp(mapping.buttons[i]) )
				return true;
		}
		return false;
	}
    public override Sprite GetButtonIcon(MappedButton button)
    {
        var mapping = MappedInput.Instance.MouseInputMapping.GetMouseButtonMapping(button);

        if (mapping != null)
        {
            var iconMapping = MappedInput.Instance.MouseInputMapping.MouseIconMappings.GetMouseButtonIconMapping(mapping.mouseButtonId);
            if (iconMapping != null)
            {
                return(iconMapping.Icon);
            }
        }

        return(null);
    }
コード例 #22
0
    public override bool GetButton(MappedButton button)
    {
        var mapping = MappedInput.instance.gamepadInputMapping.GetGamepadButtonMapping(button);

        if (mapping != null)
        {
            for (int i = 0; i < mapping.buttons.Length; i++)
            {
                if (gamepad.GetButton(mapping.buttons [i]))
                {
                    return(true);
                }
            }
        }
        return(false);
    }
コード例 #23
0
    public override bool GetButtonUp(MappedButton button)
    {
        var mapping = MappedInput.instance.keyboardInputMapping.GetButtonMapping(button);

        if (mapping == null)
        {
            return(false);
        }

        for (int i = 0; i < mapping.buttons.Length; i++)
        {
            if (Input.GetKeyUp(mapping.buttons[i]))
            {
                return(true);
            }
        }
        return(false);
    }
コード例 #24
0
	public abstract string GetButtonName (MappedButton button);	
コード例 #25
0
	public abstract bool GetButtonUp (MappedButton button);
コード例 #26
0
	public abstract bool GetButtonDown (MappedButton button);
コード例 #27
0
 public abstract Sprite GetButtonIcon(MappedButton button);
コード例 #28
0
 public abstract string GetButtonName(MappedButton button);
コード例 #29
0
 public abstract bool GetButtonDown(MappedButton button);
コード例 #30
0
 public abstract bool GetButtonUp(MappedButton button);