Skip to content

Commit

Permalink
refactor: 更新shoot接口
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim-shop committed May 10, 2023
1 parent e6a4d10 commit e32ee16
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package net.imshit.aircraftwar.element.aircraft
import net.imshit.aircraftwar.element.AbstractFlyingObject
import net.imshit.aircraftwar.element.animation.DyingAnimation
import net.imshit.aircraftwar.element.bullet.Bullets
import net.imshit.aircraftwar.element.shoot.AbstractShootStrategyFactory
import net.imshit.aircraftwar.element.shoot.ShootStrategyFactories
import net.imshit.aircraftwar.logic.Games

abstract class AbstractAircraft(
Expand All @@ -14,7 +14,7 @@ abstract class AbstractAircraft(
speedY: Float,
val maxHp: Int,
val power: Int,
val shootStrategyFactory: AbstractShootStrategyFactory,
val shootStrategyFactory: ShootStrategyFactories,
shootNum: Int
) : AbstractFlyingObject(
game = game,
Expand Down Expand Up @@ -44,7 +44,7 @@ abstract class AbstractAircraft(
}

fun shoot(): List<Bullets> =
this.shootStrategy.shoot(game, this.x, this.y, this.speedY, this.power)
this.shootStrategy.shoot(this.x, this.y, this.speedY, this.power)

val animation: DyingAnimation
get() = DyingAnimation(this)
Expand Down

0 comments on commit e32ee16

Please sign in to comment.