summaryrefslogtreecommitdiffhomepage
path: root/app/systems/ui/score.rb
diff options
context:
space:
mode:
authorarngo <[email protected]>2021-12-26 22:30:44 -0500
committerarngo <[email protected]>2021-12-26 22:30:44 -0500
commit930802e49e33c87ef0fd2f102b9205a4098878d3 (patch)
tree56cbf22ebbb4b16ac037eb2f525ca15d5656b96f /app/systems/ui/score.rb
parent70b2499a8753331b68fb7a61a8882c9ff0b017d8 (diff)
downloadSteelWings-930802e49e33c87ef0fd2f102b9205a4098878d3.tar.gz
SteelWings-930802e49e33c87ef0fd2f102b9205a4098878d3.zip
implement score ui
Diffstat (limited to 'app/systems/ui/score.rb')
-rw-r--r--app/systems/ui/score.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/systems/ui/score.rb b/app/systems/ui/score.rb
new file mode 100644
index 0000000..c761561
--- /dev/null
+++ b/app/systems/ui/score.rb
@@ -0,0 +1,7 @@
+FF::Sys.new("Score", priority: 50) do
+ score = FF::Cmp::SingletonScore[0]
+ score.score += 100
+ score.entities[0].components[FF::Cmp::Label].each do |label|
+ label.props[:text] = score.score.to_s
+ end
+end