Skip to content

Commit

Permalink
fix: 策略模式
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim-shop committed May 11, 2023
1 parent f6c5478 commit ee9c756
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package net.imshit.aircraftwar.logic.game

import android.content.Context
import android.util.AttributeSet
import net.imshit.aircraftwar.logic.generate.enemy.EasyEnemyGenerateStrategy

class EasyGame(context: Context, attrs: AttributeSet?, soundMode: Boolean) : Games(
context = context, attrs = attrs, soundMode = soundMode
Expand All @@ -16,5 +17,6 @@ class EasyGame(context: Context, attrs: AttributeSet?, soundMode: Boolean) : Gam
)

override val background = images.backgroundEasy
override val generateStrategy = EasyEnemyGenerateStrategy(this)
// TODO
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package net.imshit.aircraftwar.logic.game

import android.content.Context
import android.util.AttributeSet
import net.imshit.aircraftwar.logic.generate.enemy.EasyEnemyGenerateStrategy

class HardGame(context: Context, attrs: AttributeSet?, soundMode: Boolean) : Games(
context = context, attrs = attrs, soundMode = soundMode
Expand All @@ -16,5 +17,6 @@ class HardGame(context: Context, attrs: AttributeSet?, soundMode: Boolean) : Gam
)

override val background = images.backgroundHard
override val generateStrategy = EasyEnemyGenerateStrategy(this)
// TODO
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package net.imshit.aircraftwar.logic.game

import android.content.Context
import android.util.AttributeSet
import net.imshit.aircraftwar.logic.generate.enemy.EasyEnemyGenerateStrategy

class MediumGame(context: Context, attrs: AttributeSet?, soundMode: Boolean) : Games(
context = context, attrs = attrs, soundMode = soundMode
Expand All @@ -16,5 +17,7 @@ class MediumGame(context: Context, attrs: AttributeSet?, soundMode: Boolean) : G
)

override val background = images.backgroundMedium
override val generateStrategy = EasyEnemyGenerateStrategy(this)

//TODO
}

0 comments on commit ee9c756

Please sign in to comment.