Skip to content

Commit

Permalink
feat: 增加valid状态获取
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim-shop committed May 11, 2023
1 parent 81535e0 commit f6c5478
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ abstract class AbstractFlyingObject(
val width: Float by lazy { this.image.width.toFloat() }
val height: Float by lazy { this.image.height.toFloat() }
protected open val boundingHeight: Float by lazy { this.height }
private var isValid: Boolean = true
var isValid: Boolean = true
private set

fun notValid() = !this.isValid

open fun forward(timeMs: Int) {
this.x += this.speedX * timeMs
Expand Down

0 comments on commit f6c5478

Please sign in to comment.