C# Class Artemis.Engine.Input.MouseInput

The main mouse input provider class.
Afficher le fichier Open project: ArtemisEngine/Artemis-Engine Class Usage Examples

Méthodes publiques

Свойство Type Description
MouseButtons MouseButton[]
PreviousPositions List

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
Update ( ) : void

Update the internal state of the mouse.

UpdateButton ( ButtonState state, MouseButton button ) : void

Method Details

IsClicked() public méthode

Check if a button is clicked (i.e. pressed for exactly 1 frame).
public IsClicked ( MouseButton button ) : bool
button MouseButton
Résultat bool

IsHeld() public méthode

Check if a button is being held down (coincides with IsClicked).
public IsHeld ( MouseButton button ) : bool
button MouseButton
Résultat bool

IsHeldFor() public méthode

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
Résultat bool

IsHeldForAtleast() public méthode

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
Résultat bool

IsMouseStill() public méthode

Check if the mouse is still.
public IsMouseStill ( ) : bool
Résultat bool

IsMouseStillFor() public méthode

Check if the mouse has been still for exactly the given number of frames.
public IsMouseStillFor ( int frames ) : bool
frames int
Résultat bool

IsMouseStillForAtleast() public méthode

Check if the mouse has been still for at least the given number of frames.
public IsMouseStillForAtleast ( int frames ) : bool
frames int
Résultat bool

IsReleased() public méthode

Check if a button has been released (i.e. unpressed for exactly 1 frame).
public IsReleased ( MouseButton button ) : bool
button MouseButton
Résultat bool

IsUnheld() public méthode

Check if a button is not being held down.
public IsUnheld ( MouseButton button ) : bool
button MouseButton
Résultat bool

IsUnheldFor() public méthode

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
Résultat bool

IsUnheldForAtleast() public méthode

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
Résultat bool

MouseInput() public méthode

public MouseInput ( ) : System.Collections.Generic
Résultat System.Collections.Generic

Property Details

MouseButtons public_oe static_oe property

public static MouseButton[] MouseButtons
Résultat MouseButton[]

PreviousPositions public_oe property

A list of the previous mouse positions (stored for 60 frames).
public List PreviousPositions
Résultat List