Package controller.inputs
Class MouseKeyInputs
java.lang.Object
controller.inputs.MouseKeyInputs
- All Implemented Interfaces:
MouseListener,EventListener
This class implements the
MouseListener interface.
Controller for listening to mouse inputs and handling them, rerouting the information to the right input controller based on the game state.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidOverrides mouseClicked method fromMouseListenerinterface.voidOverrides mouseEntered method fromMouseListenerinterface.voidOverrides mouseExited method fromMouseListenerinterface.voidOverrides mousePressed method fromMouseListenerinterface.voidOverrides mouseReleased method fromMouseListenerinterface.
-
Constructor Details
-
MouseKeyInputs
Constructs a new MouseKeyInputs.- Parameters:
gamePanel- the game panel
-
-
Method Details
-
mouseClicked
Overrides mouseClicked method fromMouseListenerinterface.- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
e- the MouseEvent to handle
-
mousePressed
Overrides mousePressed method fromMouseListenerinterface.- Specified by:
mousePressedin interfaceMouseListener- Parameters:
e- the MouseEvent to handle
-
mouseReleased
Overrides mouseReleased method fromMouseListenerinterface.- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
e- the MouseEvent to handle
-
mouseEntered
Overrides mouseEntered method fromMouseListenerinterface.- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
e- the MouseEvent to handle
-
mouseExited
Overrides mouseExited method fromMouseListenerinterface.- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
e- the MouseEvent to handle
-