Change of the repository structure

SQLite
Lucas Delanier 2 years ago
parent e9122a8671
commit 5505a906da

15
.gitignore vendored

@ -1,15 +0,0 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties

3
.idea/.gitignore vendored

@ -1,3 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml

@ -1 +0,0 @@
Shake&Craft

@ -1,123 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="VisualizationToolProject">
<option name="state">
<ProjectState>
<option name="scale" value="0.2" />
</ProjectState>
</option>
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

1
app/.gitignore vendored

@ -1 +0,0 @@
/build

@ -1,5 +0,0 @@
<svg width="20" height="6" viewBox="0 0 20 6" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="2.8" cy="2.8" r="2.8" fill="#807F85"/>
<circle cx="10" cy="2.8" r="2.8" fill="#807F85"/>
<circle cx="17.2" cy="2.8" r="2.8" fill="#807F85"/>
</svg>

Before

Width:  |  Height:  |  Size: 254 B

@ -1,3 +0,0 @@
<svg width="26" height="21" viewBox="0 0 26 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.6373 16.9847V16.9863C19.6352 18.2294 19.633 19.5653 19.6327 21H23.8776C25.0497 21 26 20.0752 26 18.9344V8.5205H19.6059C19.6476 10.7349 19.6431 13.4989 19.6373 16.9847ZM26 6.97132L25.1875 3.95902C25.1875 1.77251 23.3662 3.85138e-07 21.1195 3.85138e-07L18.2622 0C18.946 1.12968 19.2802 2.59713 19.4536 4.85383C19.5021 5.48565 19.5385 6.18774 19.5656 6.97132H26ZM16.2679 0H9.53047C8.60061 0.905769 8.06823 2.10936 7.79414 5.08346C7.74179 5.65155 7.6993 6.27775 7.66483 6.97132H17.973C17.9469 6.23101 17.9121 5.5675 17.8661 4.96935C17.6427 2.06096 17.1643 0.891361 16.2679 0ZM7.51558 0H4.875C2.62829 0 0.806973 1.77251 0.806973 3.95902L0 6.97132H6.07138C6.10752 6.22617 6.15256 5.55392 6.20867 4.94507C6.4214 2.63677 6.80004 1.1417 7.51558 0ZM0 8.5205H6.01155C5.92429 11.4096 5.92464 15.2253 5.9251 20.3486V20.3499C5.92512 20.5643 5.92514 20.781 5.92516 21H2.12245C0.950253 21 0 20.0752 0 18.9344V8.5205ZM7.51698 21L7.51696 20.441C7.51658 15.211 7.5163 11.3833 7.60387 8.5205H11.1428C10.7045 8.96831 10.4354 9.57448 10.4354 10.2418C10.4354 11.6203 11.5836 12.7377 13 12.7377C14.4164 12.7377 15.5646 11.6203 15.5646 10.2418C15.5646 9.57448 15.2955 8.96831 14.8572 8.5205H18.014C18.0555 10.7028 18.0511 13.4466 18.0454 16.9486L18.0454 16.95C18.0433 18.2004 18.0412 19.5474 18.0409 21H7.51698ZM13 11.5328C13.7326 11.5328 14.3265 10.9548 14.3265 10.2418C14.3265 9.52882 13.7326 8.95082 13 8.95082C12.2674 8.95082 11.6735 9.52882 11.6735 10.2418C11.6735 10.9548 12.2674 11.5328 13 11.5328Z" fill="#807F85"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

@ -1,3 +0,0 @@
<svg width="19" height="21" viewBox="0 0 19 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.2233 0.382348L9.44519 1.96647C9.32151 2.21823 9.36956 2.51847 9.56598 2.72131L15.1094 8.44573C15.3907 8.73621 15.8675 8.72468 16.1337 8.42096L18.8341 5.34044C19.0615 5.08103 19.0543 4.69635 18.8174 4.44522L15.3784 0.800126C15.1419 0.549486 14.7511 0.510963 14.4682 0.710398L13.5124 1.3842C13.2504 1.56884 12.8925 1.55103 12.6511 1.34136L11.3028 0.170304C10.9603 -0.127203 10.4217 -0.0213953 10.2233 0.382348ZM11.6234 6.67399L13.1054 8.08869C13.367 8.33852 13.3835 8.74461 13.143 9.01393L3.00587 20.3614C2.39513 21.0451 1.33849 21.1292 0.62257 20.5512C-0.120934 19.9509 -0.211732 18.8696 0.421685 18.1588L10.6218 6.71346C10.8821 6.42144 11.34 6.4034 11.6234 6.67399ZM12.9045 10.7192L8.63334 15.1991C8.51645 15.3217 8.50953 15.5096 8.61709 15.6401L9.86777 17.1576C9.99171 17.308 10.2193 17.326 10.3664 17.197L11.7794 15.9581C11.9262 15.8295 12.1533 15.8471 12.2774 15.9968L14.3493 18.4957C14.3105 18.6504 14.2899 18.8121 14.2899 18.9785C14.2899 20.0949 15.2159 21 16.3582 21C17.5006 21 18.4266 20.0949 18.4266 18.9785C18.4266 17.862 17.5006 16.957 16.3582 16.957C16.2106 16.957 16.0666 16.9721 15.9277 17.0008L13.6126 14.6702C13.5331 14.5902 13.4993 14.477 13.5223 14.3678L14.1076 11.5818C14.1317 11.4674 14.0934 11.349 14.0064 11.2689L13.3931 10.7037C13.254 10.5755 13.0348 10.5825 12.9045 10.7192ZM9.35027 7.01128L7.91146 8.58241L4.00574 5.24896L6.98126 9.59814L5.63675 11.0663C5.50143 11.2141 5.26543 11.2162 5.12733 11.0709L0.219788 5.90745C0.160552 5.84513 0.12763 5.76321 0.12763 5.67815V1.09244C0.12763 0.896178 0.298578 0.741457 0.49879 0.756509L4.465 1.0547C4.55712 1.06162 4.64255 1.10441 4.7021 1.17345L9.35696 6.5694C9.46768 6.69775 9.46483 6.88618 9.35027 7.01128Z" fill="#807F85"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 KiB

@ -1,50 +0,0 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.shakecraft'
compileSdk 33
defaultConfig {
applicationId "com.example.shakecraft"
minSdk 19
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.google.ar.sceneform:filament-android:1.17.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
}

@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

@ -1,24 +0,0 @@
package com.example.shakecraft
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.shakecraft", appContext.packageName)
}
}

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.sensor.accelerometer" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.ShakeCraft"
tools:targetApi="31">
<activity
android:name=".CollectActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

@ -1,178 +0,0 @@
package com.example.shakecraft
import android.content.Context
import android.content.pm.ActivityInfo
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import android.hardware.SensorManager
import android.os.Bundle
import android.os.Vibrator
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.animation.Animation
import android.view.animation.ScaleAnimation
import android.widget.ImageView
import android.widget.ProgressBar
import android.widget.TextView
import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.example.shakecraft.model.Generator
import com.example.shakecraft.view.adapter.AdapterBossLoot
import kotlin.math.pow
import kotlin.math.sqrt
class BossFragment() : Fragment() {
private lateinit var sensorManager: SensorManager
private lateinit var accelerometer: Sensor
private lateinit var accelerometerEventListener: SensorEventListener
private lateinit var progressBar: ProgressBar
private lateinit var image: ImageView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val player = (activity as MainActivity).currentPlayer
val view = inflater.inflate(R.layout.fragment_boss, container, false)
val buttonCollect = view.findViewById<TextView>(R.id.backbutton)
buttonCollect.setOnClickListener{
findNavController().navigate(R.id.action_bossFragment_to_homeFragment)
}
val imageView = view.findViewById<ImageView>(R.id.imageBoss)
imageView.scaleX = 1.2f
imageView.scaleY = 1.2f
// Créez une animation qui modifie la propriété scaleX et scaleY de l'image
val scaleAnimation = ScaleAnimation(
1.2f, // de 2.0 à 1.0
1.0f,
1.2f,
1.0f,
Animation.RELATIVE_TO_SELF,
0.5f,
Animation.RELATIVE_TO_SELF,
0.5f
)
scaleAnimation.duration = 1000 // dure 1 seconde
scaleAnimation.repeatCount = Animation.INFINITE // répéter indéfiniment
scaleAnimation.repeatMode = Animation.REVERSE // inverser la direction de l'animation
// Appliquez l'animation à l'image
imageView.startAnimation(scaleAnimation)
progressBar = view.findViewById(R.id.progressBar)
sensorManager = requireActivity().getSystemService(Context.SENSOR_SERVICE) as SensorManager
accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)
var boss = Generator.generateBoss()
progressBar.max = boss.maxlife
progressBar.progress = boss.life
imageView.setImageResource(boss.image)
val recyclerView: RecyclerView = view.findViewById(R.id.recyclerviewBossLoot)
with(recyclerView) {
layoutManager = LinearLayoutManager(view.context)
adapter = AdapterBossLoot(boss.possibleLoot)
}
// Créez un écouteur de capteur d'accéléromètre pour écouter les secousses
accelerometerEventListener = object : SensorEventListener {
override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) {
// Ne faites rien ici
}
override fun onSensorChanged(event: SensorEvent?) {
val acceleration = sqrt(
event!!.values[0].pow(2) + event.values[1].pow(2) + event.values[2].pow(2)
)
if(boss.life <= 0){
val item = Generator.generateLootBoss(boss.possibleLoot)
println(item)
player.addItem(item)
player.gainXp(boss.xpReward)
val maVue = view.findViewById<View>(R.id.toast)
val image = maVue.findViewById<ImageView>(R.id.imageViewLoot)
val name = maVue.findViewById<TextView>(R.id.nameLoot)
val xp = maVue.findViewById<TextView>(R.id.xpRewarded)
maVue.visibility = View.VISIBLE
image.setImageResource(item.image)
name.text = item.name
xp.text = boss.xpReward.toString()
maVue.postDelayed({
maVue.visibility = View.GONE
}, 3000)
boss = Generator.generateBoss()
println(boss)
imageView.setImageResource(boss.image)
val vibrator = context?.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
vibrator.vibrate(100)
progressBar.max = boss.maxlife
progressBar.progress = boss.life
with(recyclerView) {
layoutManager = LinearLayoutManager(view.context)
adapter = AdapterBossLoot(boss.possibleLoot)
}
// Définissez la propriété scaleX et scaleY de l'image sur 0.5f
}
if (acceleration > 40) {
boss.takeDamage((acceleration/80).toInt())
progressBar.progress = boss.life
}
}
}
sensorManager.registerListener(
accelerometerEventListener,
accelerometer,
SensorManager.SENSOR_DELAY_GAME
)
return view
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
val activity = requireActivity()
activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
}
override fun onDestroy() {
super.onDestroy()
// Désenregistrez l'écouteur de capteur d'accéléromètre lorsque le fragment est détruit
sensorManager.unregisterListener(accelerometerEventListener)
val activity = requireActivity()
activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
}
}

@ -1,132 +0,0 @@
package com.example.shakecraft
import android.annotation.SuppressLint
import android.content.Context
import android.content.pm.ActivityInfo
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import android.hardware.SensorManager
import android.os.Bundle
import android.os.Vibrator
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.ProgressBar
import android.widget.TextView
import androidx.navigation.fragment.findNavController
import com.example.shakecraft.model.Generator
import kotlin.math.pow
import kotlin.math.sqrt
class CollectFragment() : Fragment() {
private lateinit var sensorManager: SensorManager
private lateinit var accelerometer: Sensor
private lateinit var accelerometerEventListener: SensorEventListener
private lateinit var progressBar: ProgressBar
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val player = (activity as MainActivity).currentPlayer
// Récupérez une référence à la ProgressBar dans la vue
val view = inflater.inflate(R.layout.fragment_collect, container, false)
val buttonCollect = view.findViewById<TextView>(R.id.backbutton)
buttonCollect.setOnClickListener{
findNavController().navigate(R.id.action_collectFragment_to_homeFragment)
}
progressBar = view.findViewById(R.id.progressBar)
sensorManager = requireActivity().getSystemService(Context.SENSOR_SERVICE) as SensorManager
accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)
// Créez un écouteur de capteur d'accéléromètre pour écouter les secousses
accelerometerEventListener = object : SensorEventListener {
override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) {
// Ne faites rien ici
}
@SuppressLint("ServiceCast")
override fun onSensorChanged(event: SensorEvent?) {
val acceleration = sqrt(
event!!.values[0].pow(2) + event.values[1].pow(2) + event.values[2].pow(2)
)
if(progressBar.progress == 100){
val item = Generator.generateLootCollection()
println(item)
player.addItem(item)
player.gainXp(item.xpReward)
progressBar.progress = 0
val vibrator = context?.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
vibrator.vibrate(100)
val maVue = view.findViewById<View>(R.id.toast)
val image = maVue.findViewById<ImageView>(R.id.imageViewLoot)
val name = maVue.findViewById<TextView>(R.id.nameLoot)
val xp = maVue.findViewById<TextView>(R.id.xpRewarded)
maVue.visibility = View.VISIBLE
image.setImageResource(item.image)
name.text = item.name
xp.text = item.xpReward.toString()
maVue.postDelayed({
maVue.visibility = View.GONE
}, 3000)
}
if (acceleration > 40) {
// Le téléphone a été secoué, mettre à jour la barre de chargement ici
progressBar.progress += (acceleration/20).toInt() // Incrémente la progression de la barre de 10 unités
}
}
}
// Enregistrez l'écouteur de capteur d'accéléromètre
sensorManager.registerListener(
accelerometerEventListener,
accelerometer,
SensorManager.SENSOR_DELAY_GAME
)
// Retournez la vue de fragment
return view
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
val activity = requireActivity()
activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
}
override fun onDestroy() {
super.onDestroy()
// Désenregistrez l'écouteur de capteur d'accéléromètre lorsque le fragment est détruit
sensorManager.unregisterListener(accelerometerEventListener)
val activity = requireActivity()
activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
}
}

@ -1,60 +0,0 @@
package com.example.shakecraft
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ProgressBar
import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.navigation.NavOptions
import androidx.navigation.fragment.findNavController
class HomeFragment : Fragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val player = (activity as MainActivity).currentPlayer
val view = inflater.inflate(R.layout.fragment_home,container,false)
val buttonCollect = view.findViewById<ConstraintLayout>(R.id.buttonCollect)
buttonCollect.setOnClickListener{
findNavController().navigate(R.id.action_homeFragment_to_collectFragment, null, NavOptions.Builder().setPopUpTo(R.id.homeFragment, false).build())
}
val buttonBoss = view.findViewById<ConstraintLayout>(R.id.buttonBoss)
buttonBoss.setOnClickListener{
findNavController().navigate(R.id.action_homeFragment_to_bossFragment, null, NavOptions.Builder().setPopUpTo(R.id.homeFragment, false).build())
}
val pseudo = view.findViewById<TextView>(R.id.pseudoTextView)
val progressbar = view.findViewById<ProgressBar>(R.id.levelProgressBar)
val level = view.findViewById<TextView>(R.id.levelTextView)
val rank = view.findViewById<TextView>(R.id.rankTextView)
val maxXp = view.findViewById<TextView>(R.id.maxXpTextView)
val xp = view.findViewById<TextView>(R.id.xpTextView)
pseudo.text = player.pseudo
level.text = player.level.toString()
rank.text = player.rank
xp.text = player.xp.toString()
maxXp.text = (player.level*100).toString()
progressbar.progress = player.xp
progressbar.max = player.level*100
return view
}
}

@ -1,38 +0,0 @@
package com.example.shakecraft
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.example.shakecraft.data.Stub
import com.example.shakecraft.model.Player
import com.example.shakecraft.view.adapter.AdapterInventory
class InventoryFragment() : Fragment( ) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
var player = (activity as MainActivity).currentPlayer
val view = inflater.inflate(R.layout.fragment_inventory, container, false)
val recyclerView: RecyclerView = view.findViewById(R.id.recyclerviewInventory)
with(recyclerView) {
layoutManager = LinearLayoutManager(view.context)
adapter = AdapterInventory(player.items)
}
return view
}
}

@ -1,51 +0,0 @@
package com.example.shakecraft
import android.os.Build
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.annotation.RequiresApi
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.navigation.findNavController
import androidx.navigation.ui.setupWithNavController
import com.example.shakecraft.data.Stub
import com.google.android.material.bottomnavigation.BottomNavigationView
class MainActivity : AppCompatActivity() {
var currentPlayer = Stub().currentPlayer
@RequiresApi(Build.VERSION_CODES.R)
private fun hideSystemUI() {
WindowCompat.setDecorFitsSystemWindows(window, false)
WindowInsetsControllerCompat(window,
window.decorView.findViewById(android.R.id.content)).let { controller ->
controller.hide(WindowInsetsCompat.Type.systemBars())
controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
}
}
private lateinit var bottomNav : BottomNavigationView
@RequiresApi(Build.VERSION_CODES.R)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
hideSystemUI()
setContentView(R.layout.activity_main)
bottomNav = findViewById(R.id.bottomNavigationView)
val navController = findNavController(R.id.fragment)
bottomNav.setupWithNavController(navController)
}
}

@ -1,59 +0,0 @@
package com.example.shakecraft
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"
/**
* A simple [Fragment] subclass.
* Use the [PlusFragment.newInstance] factory method to
* create an instance of this fragment.
*/
class PlusFragment : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_plus, container, false)
}
companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment PlusFragment.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
PlusFragment().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
}
}
}

@ -1,22 +0,0 @@
package com.example.shakecraft.data
import com.example.shakecraft.R
import com.example.shakecraft.model.Item
import com.example.shakecraft.model.Player
class Stub {
fun load() : List<Item>{
val items : MutableList<Item> = mutableListOf<Item>()
items.add(Item(name = "Beech Log", rarity = 1, stack = 1, R.drawable.ic_anvil, xpReward = 10 ))
items.add(Item(name = "Bronze Ore", rarity = 2, stack = 1, R.drawable.ic_anvil, xpReward = 20))
items.add(Item(name = "Iron Ore", rarity = 3, stack = 1, R.drawable.ic_anvil, xpReward = 30))
items.add(Item(name = "Diamond", rarity = 3, stack = 1, R.drawable.ic_anvil, xpReward = 30))
return items
}
var currentPlayer : Player = Player("Winker",0)
}

@ -1,16 +0,0 @@
package com.example.shakecraft.model
class Boss (
var name: String,
var life: Int,
var maxlife: Int,
var image: Int,
var xpReward: Int,
val possibleLoot: List<Pair<Item, Double>>,
){
fun takeDamage(strength: Int) {
this.life -= strength
}
}

@ -1,84 +0,0 @@
package com.example.shakecraft.model
import com.example.shakecraft.R
import kotlin.random.Random
class Generator {
companion object {
fun generateLootCollection(): Item {
val possibleLoot: List<Pair<Item, Double>> = listOf(
Pair(Item(name = "Beech Log", rarity = 1, stack = 1, R.drawable.log2, 10), 0.6),
Pair(Item(name = "Bronze Ore", rarity = 2, stack = 1, R.drawable.bronze_ore, 20), 0.25),
Pair(Item(name = "Iron Ore", rarity = 2, stack = 1, R.drawable.iron_ore, 25), 0.10),
Pair(Item(name = "Diamond", rarity = 3, stack = 1, R.drawable.diamond, 30), 0.05),
)
val rand = Random.nextDouble()
var cumulativeProb = 0.0
for (element in possibleLoot) {
cumulativeProb += element.second
if (rand < cumulativeProb) {
return element.first
}
}
// Si aucun élément n'a été choisi, retourner le dernier élément de la liste
return possibleLoot.last().first
}
fun generateLootBoss( possibleLoot : List<Pair<Item, Double>>): Item {
val rand = Random.nextDouble()
var cumulativeProb = 0.0
for (element in possibleLoot) {
cumulativeProb += element.second
if (rand < cumulativeProb) {
return element.first
}
}
// Si aucun élément n'a été choisi, retourner le dernier élément de la liste
return possibleLoot.last().first
}
fun generateBoss(): Boss {
val possibleBoss: List<Pair<Boss, Double>> = listOf(
Pair(Boss(name = "Margit the Fell Omen", life = 150, maxlife = 150, image = R.drawable.boss, xpReward = 100, possibleLoot = listOf(
Pair(Item(name = "Monster Bones", rarity = 1, stack = 1, R.drawable.monster_bones, 10), 0.7),
Pair(Item(name = "Monster Eye", rarity = 2, stack = 1, R.drawable.monster_eyes, 20), 0.3),
)), 0.5),
Pair(Boss(name = "Godrick the Grafted", life = 200, maxlife = 200, image = R.drawable.skeleton, xpReward = 130, possibleLoot = listOf(
Pair(Item(name = "Monster Bones", rarity = 1, stack = 1, R.drawable.monster_bones, 10), 0.6),
Pair(Item(name = "Monster Eye", rarity = 2, stack = 1, R.drawable.monster_eyes, 20), 0.3),
Pair(Item(name = "Treasure Key", rarity = 2, stack = 1, R.drawable.treasure_key, 20), 0.1),
)), 0.2),
Pair(Boss(name = "Red Wolf of Radagon", life = 250, maxlife = 250, image = R.drawable.halberdier, xpReward = 210, possibleLoot = listOf(
Pair(Item(name = "Monster Bones", rarity = 1, stack = 1, R.drawable.monster_bones, 10), 0.6),
Pair(Item(name = "Monster Eye", rarity = 2, stack = 1, R.drawable.monster_eyes, 20), 0.3),
Pair(Item(name = "Treasure Key", rarity = 2, stack = 1, R.drawable.treasure_key, 20), 0.1),
)), 0.15),
Pair(Boss(name = "Old Banshee", life = 300, maxlife = 300, image = R.drawable.banshee, xpReward = 300, possibleLoot = listOf(
Pair(Item(name = "Monster Bones", rarity = 1, stack = 1, R.drawable.monster_bones, 10), 0.4),
Pair(Item(name = "Monster Eye", rarity = 2, stack = 1, R.drawable.monster_eyes, 20), 0.4),
Pair(Item(name = "Treasure Key", rarity = 2, stack = 1, R.drawable.treasure_key, 20), 0.2),
)), 0.10),
Pair(Boss(name = "Margit the Fell Omen", life = 500, maxlife = 500, image = R.drawable.lich, xpReward = 500, possibleLoot = listOf(
Pair(Item(name = "Monster Bones", rarity = 1, stack = 1, R.drawable.monster_bones, 10), 0.4),
Pair(Item(name = "Monster Eye", rarity = 2, stack = 1, R.drawable.monster_eyes, 20), 0.3),
Pair(Item(name = "Treasure Key", rarity = 2, stack = 1, R.drawable.treasure_key, 20), 0.3),
)), 0.05),
)
val rand = Random.nextDouble()
var cumulativeProb = 0.0
for (element in possibleBoss) {
cumulativeProb += element.second
if (rand < cumulativeProb) {
return element.first
}
}
// Si aucun élément n'a été choisi, retourner le dernier élément de la liste
return possibleBoss.last().first
}
}
}

@ -1,12 +0,0 @@
package com.example.shakecraft.model
data class Item(
var name: String,
var rarity: Int,
var stack: Int,
var image: Int,
var xpReward: Int,
)

@ -1,68 +0,0 @@
package com.example.shakecraft.model
class Player(val pseudo: String, var xp: Int = 0) {
var level: Int = 1
val items: MutableList<Item> = mutableListOf()
var rank: String = "Beginner"
fun changeRank(){
if(this.level<=2){
this.rank = "Beginner"
}
else if(this.level<=5){
this.rank = "Intermediate"
}
else if(this.level<=8){
this.rank = "Proficient"
}
else if(this.level<=11){
this.rank = "Expert"
}
else if(this.level<=14){
this.rank = "Master"
}
else if(this.level<=17){
this.rank = "Professional"
}
else if(this.level<=20){
this.rank = "Champion"
}
else if(this.level<=23){
this.rank = "Beginner"
}
else if(this.level<=26){
this.rank = "Legend"
}
else if(this.level<=26){
this.rank = "Invincible"
}
else if(this.level<=29){
this.rank = "Divine"
}
}
fun addItem(item: Item) {
val findItem = items.find { it.name == item.name }
if(findItem!= null){
findItem.stack += 1
}
else{items.add(item)}
}
fun gainXp(xp: Int) {
this.xp += xp
if (this.xp >= this.level *100){
this.level +=1
this.xp = 0
changeRank()
}
}
fun removeItem(item: Item) {
items.remove(item)
}
}

@ -1,4 +0,0 @@
package com.example.shakecraft.model
class Recipe(val item: Item, val quantity: Int, itemsNeeded : List<Item>) {
}

@ -1,54 +0,0 @@
package com.example.shakecraft.view.adapter
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.example.shakecraft.R
import com.example.shakecraft.model.Item
class AdapterBossLoot(private val possibleLoot: List<Pair<Item, Double>>) : RecyclerView.Adapter<AdapterBossLoot.ViewHolder>() {
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val textView: TextView
val textViewDropRate: TextView
var imageView: ImageView
init {
// Define click listener for the ViewHolder's View
textView = view.findViewById(R.id.item_name)
textViewDropRate = view.findViewById(R.id.item_stock)
imageView = view.findViewById(R.id.item_image)
}
fun bind(item: Pair<Item, Double>) {
textView.text = item.first.name
textViewDropRate.text = (item.second*100).toString() + "%"
imageView.setImageResource(item.first.image)
}
}
override fun getItemCount() = possibleLoot.size
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.list_loot, parent, false)
return ViewHolder(view)
}
override fun onBindViewHolder(viewHolder: ViewHolder, position: Int) {
val item : Pair<Item, Double> = possibleLoot[position]
viewHolder.bind(item)
}
}

@ -1,54 +0,0 @@
package com.example.shakecraft.view.adapter
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.Adapter
import com.example.shakecraft.R
import com.example.shakecraft.model.Item
import com.example.shakecraft.view.viewholder.ViewHolderInventory
class AdapterInventory(private val inventory: List<Item>) : RecyclerView.Adapter<AdapterInventory.ViewHolder>() {
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val textView: TextView
val textViewNumber: TextView
var imageView: ImageView
init {
// Define click listener for the ViewHolder's View
textView = view.findViewById(R.id.item_name)
textViewNumber = view.findViewById(R.id.item_stock)
imageView = view.findViewById(R.id.item_image)
}
fun bind(item: Item) {
textView.text = item.name
textViewNumber.text = item.stack.toString()
imageView.setImageResource(item.image)
}
}
override fun getItemCount() = inventory.size
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.list_item, parent, false)
return ViewHolder(view)
}
override fun onBindViewHolder(viewHolder: ViewHolder, position: Int) {
val item : Item = inventory[position]
viewHolder.bind(item)
}
}

@ -1,3 +0,0 @@
package com.example.shakecraft.view.viewholder
class ViewHolderInventory(inflate: Any?) {
}

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M17.77,3.77l-1.77,-1.77l-10,10l10,10l1.77,-1.77l-8.23,-8.23z"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/grey_300" android:state_checked="false"></item>
<item android:color="@color/blue" android:state_checked="true"></item>
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<corners android:radius="60dp"></corners>
<solid android:color="#3B3B3B"></solid>
</shape>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape android:shape="rectangle">
<corners android:radius="60dp"></corners>
<solid android:color="@color/red"></solid>
</shape>
</scale>
</item>
</layer-list>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<corners android:radius="60dp"></corners>
<solid android:color="#3B3B3B"></solid>
</shape>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape android:shape="rectangle">
<corners android:radius="60dp"></corners>
<solid android:color="@color/blue"></solid>
</shape>
</scale>
</item>
</layer-list>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<corners android:radius="60dp"></corners>
<solid android:color="#3B3B3B"></solid>
</shape>
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%">
<shape android:shape="rectangle">
<corners android:radius="60dp"></corners>
<solid android:color="@color/yellow"></solid>
</shape>
</scale>
</item>
</layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/grey"/>
<corners android:topRightRadius="10dp"
android:topLeftRadius="10dp"
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"/>
</shape>
</item>
</layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 963 B

@ -1,10 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="19dp"
android:height="21dp"
android:viewportWidth="19"
android:viewportHeight="21">
<path
android:pathData="M10.223,0.382L9.445,1.966C9.322,2.218 9.37,2.518 9.566,2.721L15.109,8.446C15.391,8.736 15.868,8.725 16.134,8.421L18.834,5.34C19.062,5.081 19.054,4.696 18.817,4.445L15.378,0.8C15.142,0.549 14.751,0.511 14.468,0.71L13.512,1.384C13.25,1.569 12.892,1.551 12.651,1.341L11.303,0.17C10.96,-0.127 10.422,-0.021 10.223,0.382ZM11.623,6.674L13.105,8.089C13.367,8.339 13.384,8.745 13.143,9.014L3.006,20.361C2.395,21.045 1.338,21.129 0.623,20.551C-0.121,19.951 -0.212,18.87 0.422,18.159L10.622,6.713C10.882,6.421 11.34,6.403 11.623,6.674ZM12.905,10.719L8.633,15.199C8.516,15.322 8.51,15.51 8.617,15.64L9.868,17.158C9.992,17.308 10.219,17.326 10.366,17.197L11.779,15.958C11.926,15.83 12.153,15.847 12.277,15.997L14.349,18.496C14.311,18.65 14.29,18.812 14.29,18.979C14.29,20.095 15.216,21 16.358,21C17.501,21 18.427,20.095 18.427,18.979C18.427,17.862 17.501,16.957 16.358,16.957C16.211,16.957 16.067,16.972 15.928,17.001L13.613,14.67C13.533,14.59 13.499,14.477 13.522,14.368L14.108,11.582C14.132,11.467 14.093,11.349 14.006,11.269L13.393,10.704C13.254,10.575 13.035,10.583 12.905,10.719ZM9.35,7.011L7.911,8.582L4.006,5.249L6.981,9.598L5.637,11.066C5.501,11.214 5.265,11.216 5.127,11.071L0.22,5.907C0.161,5.845 0.128,5.763 0.128,5.678V1.092C0.128,0.896 0.299,0.741 0.499,0.757L4.465,1.055C4.557,1.062 4.643,1.104 4.702,1.173L9.357,6.569C9.468,6.698 9.465,6.886 9.35,7.011Z"
android:fillColor="#807F85"
android:fillType="evenOdd"/>
</vector>

@ -1,10 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="26dp"
android:height="21dp"
android:viewportWidth="26"
android:viewportHeight="21">
<path
android:pathData="M19.637,16.985V16.986C19.635,18.229 19.633,19.565 19.633,21H23.878C25.05,21 26,20.075 26,18.934V8.521H19.606C19.648,10.735 19.643,13.499 19.637,16.985ZM26,6.971L25.188,3.959C25.188,1.773 23.366,0 21.119,0L18.262,0C18.946,1.13 19.28,2.597 19.454,4.854C19.502,5.486 19.538,6.188 19.566,6.971H26ZM16.268,0H9.53C8.601,0.906 8.068,2.109 7.794,5.083C7.742,5.652 7.699,6.278 7.665,6.971H17.973C17.947,6.231 17.912,5.568 17.866,4.969C17.643,2.061 17.164,0.891 16.268,0ZM7.516,0H4.875C2.628,0 0.807,1.773 0.807,3.959L0,6.971H6.071C6.108,6.226 6.153,5.554 6.209,4.945C6.421,2.637 6.8,1.142 7.516,0ZM0,8.521H6.012C5.924,11.41 5.925,15.225 5.925,20.349V20.35C5.925,20.564 5.925,20.781 5.925,21H2.122C0.95,21 0,20.075 0,18.934V8.521ZM7.517,21L7.517,20.441C7.517,15.211 7.516,11.383 7.604,8.521H11.143C10.705,8.968 10.435,9.574 10.435,10.242C10.435,11.62 11.584,12.738 13,12.738C14.416,12.738 15.565,11.62 15.565,10.242C15.565,9.574 15.295,8.968 14.857,8.521H18.014C18.056,10.703 18.051,13.447 18.045,16.949L18.045,16.95C18.043,18.2 18.041,19.547 18.041,21H7.517ZM13,11.533C13.733,11.533 14.326,10.955 14.326,10.242C14.326,9.529 13.733,8.951 13,8.951C12.267,8.951 11.674,9.529 11.674,10.242C11.674,10.955 12.267,11.533 13,11.533Z"
android:fillColor="#807F85"
android:fillType="evenOdd"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

@ -1,74 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>

@ -1,15 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="6dp"
android:viewportWidth="20"
android:viewportHeight="6">
<path
android:pathData="M2.8,2.8m-2.8,0a2.8,2.8 0,1 1,5.6 0a2.8,2.8 0,1 1,-5.6 0"
android:fillColor="#807F85"/>
<path
android:pathData="M10,2.8m-2.8,0a2.8,2.8 0,1 1,5.6 0a2.8,2.8 0,1 1,-5.6 0"
android:fillColor="#807F85"/>
<path
android:pathData="M17.2,2.8m-2.8,0a2.8,2.8 0,1 1,5.6 0a2.8,2.8 0,1 1,-5.6 0"
android:fillColor="#807F85"/>
</vector>

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/black_800"/>
<corners
android:topLeftRadius="5dp"
android:topRightRadius="5dp"
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"/>
<stroke android:width="1dp"
android:color="@color/white" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/grey_100" />
</shape>
</item>
<item android:top="2dp" >
<shape android:shape="rectangle">
<solid android:color="@color/black_800" />
</shape>
</item>
</layer-list>

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/grey"/>
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp"
android:bottomLeftRadius="12dp"
android:bottomRightRadius="12dp"/>
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/black_800"/>
<corners
android:topLeftRadius="10dp"
android:topRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:bottomRightRadius="10dp"/>
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_800"
tools:context=".MainActivity">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:background="@drawable/navbar_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/nav_menu"
app:itemIconTint="@drawable/botom_nav_colors"
app:itemTextColor="@drawable/botom_nav_colors"
/>
<fragment
android:id="@+id/fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="718dp"
app:defaultNavHost="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
app:navGraph="@navigation/my_nav"></fragment>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,165 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroundboss"
android:scaleType="center"
tools:context=".BossFragment">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="50dp"
android:paddingBottom="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/backbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:drawableStart="@drawable/back"
android:drawableTint="@color/blue"
android:text="Home"
android:textColor="@color/blue"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Dungeon"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</FrameLayout>
<ImageView
android:id="@+id/imageView"
android:layout_width="200dp"
android:layout_height="130dp"
android:src="@drawable/image_boss"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_marginHorizontal="50dp"
android:max="300"
android:progress="300"
android:progressDrawable="@drawable/custom_boss_progressbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<ImageView
android:layout_marginTop="20dp"
android:id="@+id/imageBoss"
android:layout_width="150dp"
android:layout_height="150dp"
app:layout_constraintBottom_toTopOf="@+id/recyclerviewBossLoot"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar"
tools:src="@drawable/skeleton"></ImageView>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerviewBossLoot"
android:overScrollMode="never"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginHorizontal="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageBoss"
tools:listitem="@layout/list_item" />
<androidx.constraintlayout.widget.ConstraintLayout
android:visibility="invisible"
tools:visibility="visible"
android:id="@+id/toast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="20dp"
android:paddingVertical="2dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/toast_notification">
<ImageView
android:id="@+id/imageViewLoot"
android:layout_margin="5dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/item_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageViewLoot"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/nameLoot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="15sp"
android:textColor="@color/white"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/xpRewarded"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="10"
android:textColor="@color/grey_300"
android:textSize="10sp"></TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="xp"
android:textColor="@color/grey_300"
android:textSize="10sp"></TextView>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,280 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroundforest2"
android:scaleType="center"
tools:context=".CollectFragment">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="50dp"
android:paddingBottom="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:clickable="true"
android:id="@+id/backbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:drawableStart="@drawable/back"
android:drawableTint="@color/blue"
android:text="Home"
android:textColor="@color/blue"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Pleasant Forest"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</FrameLayout>
<ImageView
android:id="@+id/imageView"
android:layout_width="200dp"
android:layout_height="130dp"
android:src="@drawable/image_collect"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_marginHorizontal="50dp"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/custom_collect_progressbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<LinearLayout
android:layout_width="match_parent"
android:layout_marginHorizontal="50dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="100dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar">
<LinearLayout
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/item_background"
android:src="@drawable/log2"></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Log tree"
android:textStyle="bold"
android:textColor="@color/white"
android:layout_marginLeft="10dp"
android:textSize="16dp"></TextView>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/grey_300"
android:text="60%"></TextView>
</LinearLayout>
<LinearLayout
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/item_background"
android:src="@drawable/bronze_ore"></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bronze Ore"
android:textStyle="bold"
android:textColor="@color/white"
android:layout_marginLeft="10dp"
android:textSize="16dp"></TextView>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/grey_300"
android:text="25%"></TextView>
</LinearLayout>
<LinearLayout
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/item_background"
android:src="@drawable/iron_ore"></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Iron Ore"
android:textStyle="bold"
android:textColor="@color/white"
android:layout_marginLeft="10dp"
android:textSize="16dp"></TextView>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/grey_300"
android:text="10%"></TextView>
</LinearLayout>
<LinearLayout
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/item_background"
android:src="@drawable/diamond"></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Diamond"
android:textStyle="bold"
android:textColor="@color/white"
android:layout_marginLeft="10dp"
android:textSize="16dp"></TextView>
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/grey_300"
android:text="5%"></TextView>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"></LinearLayout>
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:visibility="invisible"
tools:visibility="visible"
android:id="@+id/toast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="20dp"
android:paddingVertical="2dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/toast_notification">
<ImageView
android:id="@+id/imageViewLoot"
android:layout_margin="5dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/item_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageViewLoot"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/nameLoot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="15sp"
android:textColor="@color/white"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/xpRewarded"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="10"
android:textColor="@color/grey_300"
android:textSize="10sp"></TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="xp"
android:textColor="@color/grey_300"
android:textSize="10sp"></TextView>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,316 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_800"
tools:context=".MainActivity">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:paddingBottom="20dp"
android:text="@string/home_title"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginHorizontal="15dp"
android:background="@drawable/rounded_border_button"
android:paddingLeft="15dp"
android:paddingRight="15dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.551"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:contentDescription="Landscape"
android:id="@+id/imageView2"
android:layout_width="60dp"
android:layout_height="match_parent"
android:src="@drawable/background" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
android:orientation="vertical">
<TextView
android:id="@+id/pseudoTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pseudo"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lvl."
android:textColor="@color/grey_300" />
<TextView
android:id="@+id/levelTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2"
android:textColor="@color/grey_300" />
<ProgressBar
android:id="@+id/levelProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="5dp"
android:layout_marginHorizontal="10dp"
android:layout_weight="1"
android:max="100"
android:progress="20"
android:progressDrawable="@drawable/custom_level_progressbar" />
<TextView
android:id="@+id/xpTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="349"
android:textColor="@color/white" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textColor="@color/white" />
<TextView
android:id="@+id/maxXpTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Rank"
android:textColor="@color/grey_300"
android:paddingRight="10dp"/>
<TextView
android:id="@+id/rankTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Beginner"
android:textColor="@color/white"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout2"
android:layout_width="match_parent"
android:layout_marginHorizontal="15dp"
android:layout_height="60dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
android:layout_marginVertical="10dp"
android:background="@drawable/rounded_border_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView2"
android:layout_width="40dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_height="50dp"
android:src="@drawable/ic_anvil" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ancient Forge"
android:textColor="@color/white"
android:textStyle="bold" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Craft ever more powerful tools."
android:textColor="@color/grey_300"
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/buttonCollect"
android:layout_width="match_parent"
android:layout_marginHorizontal="15dp"
android:layout_height="60dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
android:layout_marginVertical="10dp"
android:background="@drawable/rounded_border_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout2">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView2"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:src="@drawable/ic_tree" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pleasant Forest"
android:textColor="@color/white"
android:textStyle="bold" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Craft ever more powerful tools."
android:textColor="@color/grey_300"
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/buttonBoss"
android:layout_width="match_parent"
android:layout_marginHorizontal="15dp"
android:layout_height="60dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
android:layout_marginVertical="10dp"
android:background="@drawable/rounded_border_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/buttonCollect">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView2"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:src="@drawable/ic_key" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dungeon"
android:textColor="@color/white"
android:textStyle="bold" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Craft ever more powerful tools."
android:textColor="@color/grey_300"
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_800"
tools:context=".InventoryFragment">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:paddingBottom="20dp"
android:text="Inventory"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginHorizontal="10dp"
android:background="@drawable/edit_text_background"
android:drawableStart="@drawable/ic_search"
android:drawableTint="@color/grey_300"
android:hint="Rechercher"
android:inputType="textFilter"
android:paddingHorizontal="10dp"
android:singleLine="true"
android:textColor="@color/white"
android:textColorHint="@color/grey_300"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2"></EditText>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerviewInventory"
android:layout_marginHorizontal="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="#302F35"
android:dividerHeight="1dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editText"
tools:listitem="@layout/list_item"/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".PlusFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_800"
android:text="plus fragment" />
</FrameLayout>

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/item_image"
android:layout_width="60dp"
android:layout_height="60dp"
app:srcCompat="@drawable/ic_key" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textStyle="bold" />
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:id="@+id/item_stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/grey_300"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_above="@+id/bottomNav"
android:background="@color/grey_delimiter"></View>
</LinearLayout>

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:contentDescription="image of item"
android:background="@drawable/item_background"
android:id="@+id/item_image"
android:layout_width="50dp"
android:layout_height="50dp"
app:srcCompat="@drawable/ic_key" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/item_name"
android:layout_marginLeft="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textStyle="bold" />
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:id="@+id/item_stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/grey_300"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/homeFragment"
android:icon="@drawable/ic_home"
android:title="@string/home_title" />
<item
android:id="@+id/inventoryFragment"
android:icon="@drawable/ic_inventory"
android:title="@string/inventory_title" />
<item
android:id="@+id/plusFragment"
android:icon="@drawable/ic_plus"
android:title="@string/plus_title" />
</menu>

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/my_nav"
app:startDestination="@id/homeFragment">
<fragment
android:id="@+id/bossFragment"
android:name="com.example.shakecraft.BossFragment"
android:label="fragment_boss"
tools:layout="@layout/fragment_boss" >
<action
android:id="@+id/action_bossFragment_to_homeFragment"
app:destination="@id/homeFragment"
app:enterAnim="@android:anim/fade_in"
app:popUpTo="@id/homeFragment"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/collectFragment"
android:name="com.example.shakecraft.CollectFragment"
android:label="fragment_collect"
tools:layout="@layout/fragment_collect" >
<action
android:id="@+id/action_collectFragment_to_homeFragment"
app:destination="@id/homeFragment"
app:enterAnim="@android:anim/fade_in"
app:popUpTo="@id/homeFragment"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/plusFragment"
android:name="com.example.shakecraft.PlusFragment"
android:label="fragment_plus"
tools:layout="@layout/fragment_plus" />
<fragment
android:id="@+id/inventoryFragment"
android:name="com.example.shakecraft.InventoryFragment"
android:label="fragment_inventory"
tools:layout="@layout/fragment_inventory" />
<fragment
android:id="@+id/homeFragment"
android:name="com.example.shakecraft.HomeFragment"
android:label="HomeFragment" >
<action
android:id="@+id/action_homeFragment_to_collectFragment"
app:destination="@id/collectFragment"
app:enterAnim="@android:anim/fade_in" />
<action
android:id="@+id/action_homeFragment_to_bossFragment"
app:destination="@id/bossFragment"
app:enterAnim="@android:anim/fade_in" />
</fragment>
</navigation>

@ -1,18 +0,0 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.ShakeCraft" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="21">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
</resources>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save