Player
abstract class Player(var initialX: Int, var initialY: Int, val invincible: Boolean = false) : Entity
The basic class of player. After reinitialize the top.kkoishi.stg.logic.ObjectPool.player, you can switch the GameStage(gameState) to STATE_PLAYING, then this class can be rendered and upgrade correctly.
You can change the events in keyEvents to override the behavior of the player, or implement actionsImpl method. Please make sure that you recreate the Player instance or set its position to the initial position.
The rest life is held by PlayerManager, so you can get it by invoking life method for upgrading the information.
Author
KKoishi_
Parameters
initial X
the initial X coordinate of the player.
initial Y
the initial Y coordinate of the player.
invincible
if the player is invincible.