WaitStageAction

class WaitStageAction(beforeDelay: Long, val action: (AbstractStage) -> Unit) : StageAction

This class will execute the logic in StageAction after all enemy objects in the ObjectPool disappear, and equals to a class which extends StageAction and overrides the canAction method in next way:

override fun canAction(): Boolean {
if (ObjectPool.objects().hasNext())
return false
return super.canAction()
}

Author

KKoishi_

Constructors

Link copied to clipboard
constructor(beforeDelay: Long, action: (AbstractStage) -> Unit)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun canAction(): Boolean
Link copied to clipboard
open operator fun invoke(stage: AbstractStage)