You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -65,8 +67,9 @@ class FlowerGardenViewModel : GameViewModel(GameType.FLOWER_GARDEN) {
65
67
// ======================================
66
68
classWaterDroplet(
67
69
vartimestamp:Long = 0,
70
+
varplayerItemType:ItemType
68
71
) {
69
-
var color by mutableStateOf(WATER_BLUE_COLOR)
72
+
var color by mutableStateOf(WATER_BLUE_COLOR.copy(alpha =if (playerItemType ==ItemType.WATER) CURRENT_PLAYER_ITEM_ALPHAelseOPPONENT_PLAYER_ITEM_ALPHA))
var color by mutableStateOf(GRASS_GREEN_COLOR.copy(alpha =if (playerItemType ==ItemType.PLANT) CURRENT_PLAYER_ITEM_ALPHAelseOPPONENT_PLAYER_ITEM_ALPHA))
96
100
var time =0
97
101
}
98
102
@@ -172,8 +176,8 @@ class FlowerGardenViewModel : GameViewModel(GameType.FLOWER_GARDEN) {
172
176
173
177
174
178
if(ACTIVITY_DEBUG_MODE){
175
-
myItemType =ItemType.WATER
176
-
// myItemType = ItemType.PLANT
179
+
// myItemType = ItemType.WATER
180
+
myItemType =ItemType.PLANT
177
181
178
182
viewModelScope.launch(Dispatchers.Default) {
179
183
while(true){
@@ -238,10 +242,10 @@ class FlowerGardenViewModel : GameViewModel(GameType.FLOWER_GARDEN) {
0 commit comments