Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Working Blitz Meter
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubg1 committed Jan 4, 2023
1 parent a855f89 commit 6dbdb93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 47 deletions.
47 changes: 7 additions & 40 deletions ui/hud.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"Progress": {
"inheritShow":true,
"inheritHide":true,
"type": "spriteProgress",
"type": "spriteProgressBlitz",
"pos": {
"x": 300.75,
"y": 468
Expand All @@ -153,8 +153,12 @@
"inheritHide":true,
"type": "sprite",
"pos": {
"x": 330,
"y": 440
"x": 378,
"y": 549
},
"align": {
"x": 48,
"y": 109
},
"alpha": 1,
"children": {},
Expand All @@ -165,43 +169,6 @@
"value":0,
"smooth":true
},
"Progress_Complete":{
"inheritShow":false,
"inheritHide":false,
"type":"sprite",
"sprite":"sprites/particles/prog_complete.json",
"pos":{"x":261,"y":11},
"alpha": 0,
"layer":"HudControls2",
"animations":{
"in_":{
"type":"fade",
"time":0.5,
"startValue":0,
"endValue":1
}
},
"sounds":{
"in_":"sound_events/ui_progress_complete.json"
},
"children":{
"Psys_Progress_Complete":{
"inheritShow":true,
"inheritHide":true,
"type": "particle",
"pos": {
"x": 0,
"y": 0
},
"alpha": 1,
"children": {},
"animations": {},
"sounds": {},
"layer": "HudControls3",
"path": "particles/progress.json"
}
}
},
"Button_Menu": {
"inheritShow":true,
"inheritHide":true,
Expand Down
9 changes: 2 additions & 7 deletions ui/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function c.splashEnd(f)
c.Hud_Text_Score = f.getWidgetN("root/Game/Hud/Frame/Text_Score")
c.Hud_Blitz_Meter = f.getWidgetN("root/Game/Hud/Frame/Blitz_Meter")
c.Hud_Progress = f.getWidgetN("root/Game/Hud/Frame/Progress")
c.Hud_Progress_Complete = f.getWidgetN("root/Game/Hud/Frame/Progress_Complete")
c.Hud_Progress_Marker = f.getWidgetN("root/Game/Hud/Frame/Blitz_Meter")
c.Banner_LevelComplete_Text_Stage = f.getWidgetN("root/Game/Hud/Banner_LevelComplete/Frame/Text_Stage")
c.Banner_LevelComplete_Text_MapName = f.getWidgetN("root/Game/Hud/Banner_LevelComplete/Frame/Text_MapName")
c.Banner_LevelComplete_Text_LevelScore = f.getWidgetN("root/Game/Hud/Banner_LevelComplete/Frame/Container/Text_LevelScore")
Expand Down Expand Up @@ -976,12 +976,7 @@ function c.tick(f)
c.Hud_Text_Lives.widget.text = string.format("%.1d %.2d", math.floor(time / 60), time % 60)

c.Hud_Progress.widget.valueData = levelProgress
if c.Hud_Progress.widget.value == 1 then
c.Hud_Progress_Complete:show()
else
c.Hud_Progress_Complete:hide()
c.Hud_Progress_Complete:clean()
end
c.Hud_Progress_Marker.angle = -math.pi / 2 + c.Hud_Progress.widget.value * math.pi

c.Banner_LevelComplete_Text_Stage.widget.text = "STAGE " .. levelName
c.Banner_LevelComplete_Text_MapName.widget.text = levelMapName
Expand Down

0 comments on commit 6dbdb93

Please sign in to comment.