From 32bea43c2c5a64910474dd65be77514857d407c7 Mon Sep 17 00:00:00 2001 From: js Date: Fri, 12 May 2023 08:40:29 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=BD=AF=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E7=A7=BB=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../imshit/aircraftwar/element/aircraft/enemy/BossEnemy.kt | 2 +- .../imshit/aircraftwar/element/aircraft/enemy/Enemies.kt | 4 ++-- .../net/imshit/aircraftwar/element/bullet/EnemyBullet.kt | 4 ++-- .../java/net/imshit/aircraftwar/element/prop/BombProp.kt | 2 +- .../main/java/net/imshit/aircraftwar/gui/GameActivity.kt | 2 +- .../main/java/net/imshit/aircraftwar/gui/MainActivity.kt | 2 +- .../java/net/imshit/aircraftwar/gui/ScoreboardActivity.kt | 2 +- .../net/imshit/aircraftwar/logic/{ => data}/Difficulty.kt | 2 +- .../imshit/aircraftwar/logic/{ => data}/EnemyListener.kt | 2 +- .../net/imshit/aircraftwar/logic/{ => data}/GameEvents.kt | 2 +- .../main/java/net/imshit/aircraftwar/logic/game/Games.kt | 6 +++--- 11 files changed, 15 insertions(+), 15 deletions(-) rename app/src/main/java/net/imshit/aircraftwar/logic/{ => data}/Difficulty.kt (53%) rename app/src/main/java/net/imshit/aircraftwar/logic/{ => data}/EnemyListener.kt (58%) rename app/src/main/java/net/imshit/aircraftwar/logic/{ => data}/GameEvents.kt (51%) diff --git a/app/src/main/java/net/imshit/aircraftwar/element/aircraft/enemy/BossEnemy.kt b/app/src/main/java/net/imshit/aircraftwar/element/aircraft/enemy/BossEnemy.kt index 893c0bc..070b5ce 100644 --- a/app/src/main/java/net/imshit/aircraftwar/element/aircraft/enemy/BossEnemy.kt +++ b/app/src/main/java/net/imshit/aircraftwar/element/aircraft/enemy/BossEnemy.kt @@ -1,7 +1,7 @@ package net.imshit.aircraftwar.element.aircraft.enemy import net.imshit.aircraftwar.element.prop.Props -import net.imshit.aircraftwar.logic.GameEvents +import net.imshit.aircraftwar.logic.data.GameEvents import net.imshit.aircraftwar.logic.game.Games import net.imshit.aircraftwar.logic.generate.prop.PropGenerateStrategies diff --git a/app/src/main/java/net/imshit/aircraftwar/element/aircraft/enemy/Enemies.kt b/app/src/main/java/net/imshit/aircraftwar/element/aircraft/enemy/Enemies.kt index 64576f2..224b563 100644 --- a/app/src/main/java/net/imshit/aircraftwar/element/aircraft/enemy/Enemies.kt +++ b/app/src/main/java/net/imshit/aircraftwar/element/aircraft/enemy/Enemies.kt @@ -5,8 +5,8 @@ import net.imshit.aircraftwar.element.bullet.EnemyBullet import net.imshit.aircraftwar.element.prop.Props import net.imshit.aircraftwar.element.shoot.enemy.EnemyShootStrategies import net.imshit.aircraftwar.element.shoot.enemy.EnemyShootStrategyFactory -import net.imshit.aircraftwar.logic.EnemyListener -import net.imshit.aircraftwar.logic.GameEvents +import net.imshit.aircraftwar.logic.data.EnemyListener +import net.imshit.aircraftwar.logic.data.GameEvents import net.imshit.aircraftwar.logic.game.Games sealed class Enemies( diff --git a/app/src/main/java/net/imshit/aircraftwar/element/bullet/EnemyBullet.kt b/app/src/main/java/net/imshit/aircraftwar/element/bullet/EnemyBullet.kt index bdf45b4..a4b25d1 100644 --- a/app/src/main/java/net/imshit/aircraftwar/element/bullet/EnemyBullet.kt +++ b/app/src/main/java/net/imshit/aircraftwar/element/bullet/EnemyBullet.kt @@ -1,7 +1,7 @@ package net.imshit.aircraftwar.element.bullet -import net.imshit.aircraftwar.logic.EnemyListener -import net.imshit.aircraftwar.logic.GameEvents +import net.imshit.aircraftwar.logic.data.EnemyListener +import net.imshit.aircraftwar.logic.data.GameEvents import net.imshit.aircraftwar.logic.game.Games class EnemyBullet( diff --git a/app/src/main/java/net/imshit/aircraftwar/element/prop/BombProp.kt b/app/src/main/java/net/imshit/aircraftwar/element/prop/BombProp.kt index 09c0e0b..ece252c 100644 --- a/app/src/main/java/net/imshit/aircraftwar/element/prop/BombProp.kt +++ b/app/src/main/java/net/imshit/aircraftwar/element/prop/BombProp.kt @@ -1,6 +1,6 @@ package net.imshit.aircraftwar.element.prop -import net.imshit.aircraftwar.logic.GameEvents +import net.imshit.aircraftwar.logic.data.GameEvents import net.imshit.aircraftwar.logic.game.Games class BombProp( diff --git a/app/src/main/java/net/imshit/aircraftwar/gui/GameActivity.kt b/app/src/main/java/net/imshit/aircraftwar/gui/GameActivity.kt index 9de416d..235d6f2 100644 --- a/app/src/main/java/net/imshit/aircraftwar/gui/GameActivity.kt +++ b/app/src/main/java/net/imshit/aircraftwar/gui/GameActivity.kt @@ -19,7 +19,7 @@ import com.google.android.material.textfield.TextInputLayout import com.google.android.material.textfield.TextInputLayout.END_ICON_CLEAR_TEXT import net.imshit.aircraftwar.R import net.imshit.aircraftwar.databinding.ActivityGameBinding -import net.imshit.aircraftwar.logic.Difficulty +import net.imshit.aircraftwar.logic.data.Difficulty import net.imshit.aircraftwar.logic.game.Games class GameActivity : AppCompatActivity() { diff --git a/app/src/main/java/net/imshit/aircraftwar/gui/MainActivity.kt b/app/src/main/java/net/imshit/aircraftwar/gui/MainActivity.kt index a48bdd0..b9fa7b5 100644 --- a/app/src/main/java/net/imshit/aircraftwar/gui/MainActivity.kt +++ b/app/src/main/java/net/imshit/aircraftwar/gui/MainActivity.kt @@ -5,7 +5,7 @@ import androidx.appcompat.app.AppCompatActivity import com.google.android.material.dialog.MaterialAlertDialogBuilder import net.imshit.aircraftwar.R import net.imshit.aircraftwar.databinding.ActivityMainBinding -import net.imshit.aircraftwar.logic.Difficulty +import net.imshit.aircraftwar.logic.data.Difficulty class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/app/src/main/java/net/imshit/aircraftwar/gui/ScoreboardActivity.kt b/app/src/main/java/net/imshit/aircraftwar/gui/ScoreboardActivity.kt index 5dc2f57..5d5c10a 100644 --- a/app/src/main/java/net/imshit/aircraftwar/gui/ScoreboardActivity.kt +++ b/app/src/main/java/net/imshit/aircraftwar/gui/ScoreboardActivity.kt @@ -5,7 +5,7 @@ import android.content.Intent import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import net.imshit.aircraftwar.databinding.ActivityScoreboardBinding -import net.imshit.aircraftwar.logic.Difficulty +import net.imshit.aircraftwar.logic.data.Difficulty class ScoreboardActivity : AppCompatActivity() { companion object { diff --git a/app/src/main/java/net/imshit/aircraftwar/logic/Difficulty.kt b/app/src/main/java/net/imshit/aircraftwar/logic/data/Difficulty.kt similarity index 53% rename from app/src/main/java/net/imshit/aircraftwar/logic/Difficulty.kt rename to app/src/main/java/net/imshit/aircraftwar/logic/data/Difficulty.kt index 42d4285..2da38d2 100644 --- a/app/src/main/java/net/imshit/aircraftwar/logic/Difficulty.kt +++ b/app/src/main/java/net/imshit/aircraftwar/logic/data/Difficulty.kt @@ -1,4 +1,4 @@ -package net.imshit.aircraftwar.logic +package net.imshit.aircraftwar.logic.data enum class Difficulty { EASY, MEDIUM, HARD diff --git a/app/src/main/java/net/imshit/aircraftwar/logic/EnemyListener.kt b/app/src/main/java/net/imshit/aircraftwar/logic/data/EnemyListener.kt similarity index 58% rename from app/src/main/java/net/imshit/aircraftwar/logic/EnemyListener.kt rename to app/src/main/java/net/imshit/aircraftwar/logic/data/EnemyListener.kt index 4066749..8763d77 100644 --- a/app/src/main/java/net/imshit/aircraftwar/logic/EnemyListener.kt +++ b/app/src/main/java/net/imshit/aircraftwar/logic/data/EnemyListener.kt @@ -1,4 +1,4 @@ -package net.imshit.aircraftwar.logic +package net.imshit.aircraftwar.logic.data interface EnemyListener { fun notify(e: GameEvents) diff --git a/app/src/main/java/net/imshit/aircraftwar/logic/GameEvents.kt b/app/src/main/java/net/imshit/aircraftwar/logic/data/GameEvents.kt similarity index 51% rename from app/src/main/java/net/imshit/aircraftwar/logic/GameEvents.kt rename to app/src/main/java/net/imshit/aircraftwar/logic/data/GameEvents.kt index d23d7c8..578f96d 100644 --- a/app/src/main/java/net/imshit/aircraftwar/logic/GameEvents.kt +++ b/app/src/main/java/net/imshit/aircraftwar/logic/data/GameEvents.kt @@ -1,4 +1,4 @@ -package net.imshit.aircraftwar.logic +package net.imshit.aircraftwar.logic.data enum class GameEvents { BOMB_ACTIVATE diff --git a/app/src/main/java/net/imshit/aircraftwar/logic/game/Games.kt b/app/src/main/java/net/imshit/aircraftwar/logic/game/Games.kt index 045fd35..b1b04d7 100644 --- a/app/src/main/java/net/imshit/aircraftwar/logic/game/Games.kt +++ b/app/src/main/java/net/imshit/aircraftwar/logic/game/Games.kt @@ -21,9 +21,9 @@ import net.imshit.aircraftwar.element.bullet.Bullets import net.imshit.aircraftwar.element.bullet.EnemyBullet import net.imshit.aircraftwar.element.bullet.HeroBullet import net.imshit.aircraftwar.element.prop.Props -import net.imshit.aircraftwar.logic.Difficulty -import net.imshit.aircraftwar.logic.EnemyListener -import net.imshit.aircraftwar.logic.GameEvents +import net.imshit.aircraftwar.logic.data.Difficulty +import net.imshit.aircraftwar.logic.data.EnemyListener +import net.imshit.aircraftwar.logic.data.GameEvents import net.imshit.aircraftwar.logic.generate.enemy.EnemyGenerateStrategies import net.imshit.aircraftwar.util.music.BasicMusicStrategy import net.imshit.aircraftwar.util.music.BgmType