fix wrong image for monster eye item 🚧

change_to_navgraph
Lucas Delanier 2 years ago
parent 86f8a8e2b7
commit 857af1d661

@ -7,22 +7,19 @@ import androidx.annotation.RequiresApi
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.fragment.app.Fragment
import androidx.navigation.findNavController
import androidx.navigation.ui.setupWithNavController
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.example.shakecraft.data.Stub
import com.example.shakecraft.view.adapter.AdapterInventory
import com.google.android.material.bottomnavigation.BottomNavigationView
class MainActivity : AppCompatActivity() {
private var progressValue = 20
private var lastShakePosition = 0f
var currentPlayer = Stub().currentPlayer;
// Function to hide NavigationBar
var currentPlayer = Stub().currentPlayer
@RequiresApi(Build.VERSION_CODES.R)
private fun hideSystemUI() {
WindowCompat.setDecorFitsSystemWindows(window, false)
@ -30,14 +27,11 @@ class MainActivity : AppCompatActivity() {
window.decorView.findViewById(android.R.id.content)).let { controller ->
controller.hide(WindowInsetsCompat.Type.systemBars())
// When the screen is swiped up at the bottom
// of the application, the navigationBar shall
// appear for some time
controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
}
}
lateinit var bottomNav : BottomNavigationView
private lateinit var bottomNav : BottomNavigationView
@RequiresApi(Build.VERSION_CODES.R)
override fun onCreate(savedInstanceState: Bundle?) {
@ -46,7 +40,7 @@ class MainActivity : AppCompatActivity() {
setContentView(R.layout.activity_main)
bottomNav = findViewById(R.id.bottomNavigationView) as BottomNavigationView
bottomNav = findViewById(R.id.bottomNavigationView)
val navController = findNavController(R.id.fragment)
bottomNav.setupWithNavController(navController)

@ -10,10 +10,10 @@ class Boss (
){
val possibleLoot: List<Pair<Item, Double>> = listOf(
Pair(Item(name = "Monster Bones", rarity = 0, stack = 1, R.drawable.monster_bones), 0.7),
Pair(Item(name = "Monster Eye", rarity = 0, stack = 1, R.drawable.monster_bones), 0.25),
Pair(Item(name = "Monster Eye", rarity = 0, stack = 1, R.drawable.monster_eyes), 0.25),
Pair(Item(name = "Treasure Key", rarity = 0, stack = 1, R.drawable.treasure_key), 0.05),
)
fun takeDamage(strength: Int) {
this.life -= strength;
this.life -= strength
}
}
Loading…
Cancel
Save