Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
El Legado De Pintia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
diegval
El Legado De Pintia
Merge requests
!60
Ciudad
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Merged
Ciudad
ciudad
into
develop
Overview
0
Commits
7
Pipelines
0
Changes
1
Merged
izajime
requested to merge
ciudad
into
develop
5 months ago
Overview
0
Commits
7
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
97aa9f3b
Prev
Next
Show latest version
1 file
+
7
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
97aa9f3b
Fix: Ya se actualizan las monedas en el mapa de la ciudad al gastar en los edificios
· 97aa9f3b
izajime
authored
5 months ago
app/src/main/java/com/example/ellegadodepintia/MapActivity.kt
+
7
−
2
Options
@@ -15,6 +15,8 @@ class MapActivity : AppCompatActivity() {
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_map
)
GameState
.
jugador
.
addObserver
{
actualizarMonedas
()
}
val
mapButton
:
ImageButton
=
findViewById
(
R
.
id
.
mapButton
)
val
leaderboardButton
:
ImageButton
=
findViewById
(
R
.
id
.
leaderboardButton
)
val
shopButton
:
ImageButton
=
findViewById
(
R
.
id
.
shopButton
)
@@ -24,8 +26,7 @@ class MapActivity : AppCompatActivity() {
startActivity
(
intent
)
}
GameState
.
jugador
.
monedas
.
toString
().
also
{
findViewById
<
TextView
>(
R
.
id
.
moneyText
).
text
=
it
}
actualizarMonedas
()
mapButton
.
setBackgroundResource
(
R
.
drawable
.
style_texto_border
)
leaderboardButton
.
setBackgroundColor
(
Color
.
TRANSPARENT
)
@@ -55,4 +56,8 @@ class MapActivity : AppCompatActivity() {
startActivity
(
intent
)
}
}
private
fun
actualizarMonedas
(){
GameState
.
jugador
.
monedas
.
toString
().
also
{
findViewById
<
TextView
>(
R
.
id
.
moneyText
).
text
=
it
}
}
}
Loading