2020.2021-beta7
Pre-release
Pre-release
github-actions
released this
18 Jul 11:16
·
283 commits
to master
since this release
Changes in this release
Configuration
- Updated Java to 16
- Updated JavaFX to 16
- Updated Mockito to 3.8.0
- Updated Jacoco to 0.8.6
- Updated jUnit to 5.7.1
- Updated Guice to 5.0.1
Refactor
- The Mouse and Key related event handlers have been moved from the
entities.entity.userinput
package touserinput
,
since they now also apply to an instance ofYaegerScene
. - Changed the event handler for the
MouseButtonPressedListener
andMouseButtonReleasedListener
to use
aCoordinate2D
as a second parameter, instead ofint x, int y
. - Changed the package structure for better encapsulation of the internal api. This is a major refactorings and breaks
all current implementations (#181). - Renamed the module from
hanyaeger.api
tohanyaeger
(#181).
Features
- Added a
MouseMovedListener
interface, which gets called whenever the mouse has been moved. As a parameter, the
handler receives aCoordinate2D
that contains the current coordinates of the mouse pointer. - Exposed a
getCursor()
method for all Entities. - Generalized the mouse event handlers to also be applicable to a
YaegerScene
. This way, both instances
ofYaegerEntity
andYawegerScene
can implement them and receive Mouse events. - Added a
CustomFont
class, which can be used for using a custom font, based on a font file (#184). - Added several listeners that together provide drag-and-drop (#186). All these listeners are applicable to both a
YaegerScenc
and aYaegerEntity
, except theMouseDraggedListener
, which makes little sense on aYaegerScene
The following listeners have been added:MouseDraggedListener
MouseDragEnterListener
MouseDragExitListener
MouseDropListener
MouseMovedWhileDraggingListener
- Added methods to both
YaegerEntity
andYaegerScene
to set the contrast, hue and saturation (#92). - Added the option to set the
viewOrder
of aYaegerEntity
. This enables the option to decide the rendering order of
all instances ofYaegerEntity
within aYaegerScene
. By default, a new instance ofYaegerEntity
will receive
aviewOrder
of 37. If the instance was created through aTileMap
it receives aviewOrder
of 100, placing it
behind other entities (#178). - Added the option to remove a
Timer
from aTimerContainer
(either aYaegerEntity
orYaegerScene
). Previously
aTimer
could only be paused; now it is possible to completely remove it (#197). - Added a method
isActive()
which states whether theTimer
is currently active (e.g. not paused). Since
aEntitySpawner
extendsTimer
, this method is also available forEntitySpawner
. - Added the option to remove a
EntitySpawner
from anEntitySpawnerContainer
. Previously anEntitySpawner
could
only be paused; now it is possible to completely remove it (#195). - Added the option to access the instances of
YaegerEntity
, created by aTileMap
. If a reference to the
TileMap
is still available, it can be used to callgetInstanceMap()
, which returns a two dimensional array of
all instances created by theTileMap
(#202).
Bugfixes
- When a new background audio is set, the previous background audio is first stopped (#192).
- Through the exposure of the
setViewOrder(double)
method tile-maps no longer appear in front of regular entities
(#190). - Both
EntitySpawner
andTimer
can now be added outside, respectively, thesetupEntitySpawners()
and
setupTimers()
method.