diff --git a/app/src/main/java/com/android_tetris/AboutUsScreen.kt b/app/src/main/java/com/android_tetris/AboutUsScreen.kt index 2fd121b7932e9f394001e252a6bfdd2de8abffe8..a30254865f1ca0d18850044d3d4d0695b57c42ee 100644 --- a/app/src/main/java/com/android_tetris/AboutUsScreen.kt +++ b/app/src/main/java/com/android_tetris/AboutUsScreen.kt @@ -1,6 +1,5 @@ package com.android_tetris -import android_tetris.ui.theme.* import androidx.compose.foundation.* import androidx.compose.foundation.layout.* import androidx.compose.material.Button diff --git a/app/src/main/java/com/android_tetris/MainActivity.kt b/app/src/main/java/com/android_tetris/MainActivity.kt index 8227c33cd058ef883948b2c0977b888014b03e6f..53b7e1657f366c02cebf30a9a9291d4acc174463 100644 --- a/app/src/main/java/com/android_tetris/MainActivity.kt +++ b/app/src/main/java/com/android_tetris/MainActivity.kt @@ -16,7 +16,6 @@ import com.android_tetris.ui.theme.ComposeTetrisTheme // 屏幕间传递信息的变量类 class ScreenToScreenInfo { var currentScreen by mutableStateOf(0) // 初始为游戏页面 - //var currentScreen by mutableStateOf(2) // 初始为游戏页面 var difficulty by mutableStateOf(500L) // 难度选择 var currentScore by mutableStateOf(0) // 当前这局游戏的分数 var highestScore by mutableStateOf(0) // 历史最高分 @@ -46,11 +45,9 @@ class MainActivity : ComponentActivity() { 0 -> { TetrisGameScreen() } - 1 -> { SettingsScreen() } - 2 -> { AboutUsScreen() } diff --git a/app/src/main/java/com/android_tetris/TetrisSettingScreen.kt b/app/src/main/java/com/android_tetris/TetrisSettingScreen.kt index c68db6562ff3234a5fd525ad56e1fa751c858a6a..bfe0cb67eecee9aafd865fc4dbacc32daaa84a37 100644 --- a/app/src/main/java/com/android_tetris/TetrisSettingScreen.kt +++ b/app/src/main/java/com/android_tetris/TetrisSettingScreen.kt @@ -1,6 +1,5 @@ package com.android_tetris -import android_tetris.ui.theme.* import androidx.compose.foundation.background import androidx.compose.foundation.layout.* import androidx.compose.material.* @@ -11,7 +10,6 @@ import androidx.compose.ui.text.font.FontWeight import androidx.constraintlayout.compose.ConstraintLayout import androidx.compose.ui.unit.* import androidx.lifecycle.viewmodel.compose.viewModel -import com.android_tetris.ThemeViewModel import com.android_tetris.ui.theme.* import com.android_tetris.ui.theme.RadioSelectionButton import com.android_tetris.ui.theme.RectangularButton diff --git a/app/src/main/java/com/android_tetris/ui/theme/Animation.kt b/app/src/main/java/com/android_tetris/ui/theme/Animation.kt index f115f2ca854883a37c97987c01ce9f09e46d8615..1a46ffd281da8d20278c01122a6cc1da3f0eca4c 100644 --- a/app/src/main/java/com/android_tetris/ui/theme/Animation.kt +++ b/app/src/main/java/com/android_tetris/ui/theme/Animation.kt @@ -1,4 +1,4 @@ -package android_tetris.ui.theme +package com.android_tetris.ui.theme import android.graphics.* import com.android_tetris.R @@ -33,7 +33,6 @@ import androidx.compose.ui.res.imageResource import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.android_tetris.ui.theme.ComposeTetrisTheme import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.launch import kotlin.math.cos @@ -41,14 +40,6 @@ import kotlin.math.pow import kotlin.math.sin import kotlin.math.sqrt -@Composable -fun DefaultPreview() { - ComposeTetrisTheme() { - PlanetMoon() - } -} - - @Composable fun PlanetMoon() { val earthFloatAnimation by buildEarthFloatAnimation()