C# Класс Artemis.Engine.Input.MouseInput

The main mouse input provider class.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
MouseButtons MouseButton[]
PreviousPositions List

Открытые методы

Метод Описание
IsClicked ( MouseButton button ) : bool

Check if a button is clicked (i.e. pressed for exactly 1 frame).

IsHeld ( MouseButton button ) : bool

Check if a button is being held down (coincides with IsClicked).

IsHeldFor ( MouseButton button, int frames ) : bool

Check if a button has been held down for exactly the given number of frames.

IsHeldForAtleast ( MouseButton button, int frames ) : bool

Check if a button has been held down for at least the given number of frames.

IsMouseStill ( ) : bool

Check if the mouse is still.

IsMouseStillFor ( int frames ) : bool

Check if the mouse has been still for exactly the given number of frames.

IsMouseStillForAtleast ( int frames ) : bool

Check if the mouse has been still for at least the given number of frames.

IsReleased ( MouseButton button ) : bool

Check if a button has been released (i.e. unpressed for exactly 1 frame).

IsUnheld ( MouseButton button ) : bool

Check if a button is not being held down.

IsUnheldFor ( MouseButton button, int frames ) : bool

Check if a button has been left unpressed for exactly the given number of frames.

IsUnheldForAtleast ( MouseButton button, int frames ) : bool

Check if a button has been left unpressed for at least the given number of frames.

MouseInput ( ) : System.Collections.Generic

Приватные методы

Метод Описание
Update ( ) : void

Update the internal state of the mouse.

UpdateButton ( ButtonState state, MouseButton button ) : void

Описание методов

IsClicked() публичный Метод

Check if a button is clicked (i.e. pressed for exactly 1 frame).
public IsClicked ( MouseButton button ) : bool
button MouseButton
Результат bool

IsHeld() публичный Метод

Check if a button is being held down (coincides with IsClicked).
public IsHeld ( MouseButton button ) : bool
button MouseButton
Результат bool

IsHeldFor() публичный Метод

Check if a button has been held down for exactly the given number of frames.
public IsHeldFor ( MouseButton button, int frames ) : bool
button MouseButton
frames int
Результат bool

IsHeldForAtleast() публичный Метод

Check if a button has been held down for at least the given number of frames.
public IsHeldForAtleast ( MouseButton button, int frames ) : bool
button MouseButton
frames int
Результат bool

IsMouseStill() публичный Метод

Check if the mouse is still.
public IsMouseStill ( ) : bool
Результат bool

IsMouseStillFor() публичный Метод

Check if the mouse has been still for exactly the given number of frames.
public IsMouseStillFor ( int frames ) : bool
frames int
Результат bool

IsMouseStillForAtleast() публичный Метод

Check if the mouse has been still for at least the given number of frames.
public IsMouseStillForAtleast ( int frames ) : bool
frames int
Результат bool

IsReleased() публичный Метод

Check if a button has been released (i.e. unpressed for exactly 1 frame).
public IsReleased ( MouseButton button ) : bool
button MouseButton
Результат bool

IsUnheld() публичный Метод

Check if a button is not being held down.
public IsUnheld ( MouseButton button ) : bool
button MouseButton
Результат bool

IsUnheldFor() публичный Метод

Check if a button has been left unpressed for exactly the given number of frames.
public IsUnheldFor ( MouseButton button, int frames ) : bool
button MouseButton
frames int
Результат bool

IsUnheldForAtleast() публичный Метод

Check if a button has been left unpressed for at least the given number of frames.
public IsUnheldForAtleast ( MouseButton button, int frames ) : bool
button MouseButton
frames int
Результат bool

MouseInput() публичный Метод

public MouseInput ( ) : System.Collections.Generic
Результат System.Collections.Generic

Описание свойств

MouseButtons публичное статическое свойство

public static MouseButton[] MouseButtons
Результат MouseButton[]

PreviousPositions публичное свойство

A list of the previous mouse positions (stored for 60 frames).
public List PreviousPositions
Результат List