updated menu to not accept presses while "scrambling"
This commit is contained in:
parent
24d176ec53
commit
81c60b7a2a
2 changed files with 7 additions and 3 deletions
4
package
Normal file → Executable file
4
package
Normal file → Executable file
|
|
@ -2,4 +2,6 @@
|
||||||
cd "`dirname "$0"`"/.dragonruby
|
cd "`dirname "$0"`"/.dragonruby
|
||||||
cp -R ../marketing-assets/AppIcon.appiconset ./dragonruby-ios.app/Assets.xcassets/
|
cp -R ../marketing-assets/AppIcon.appiconset ./dragonruby-ios.app/Assets.xcassets/
|
||||||
cp -R ../marketing-assets/AppIcon.appiconset ./dragonruby-ios-simulator.app/Assets.xcassets/
|
cp -R ../marketing-assets/AppIcon.appiconset ./dragonruby-ios-simulator.app/Assets.xcassets/
|
||||||
exec ./dragonruby-publish --only-package ../🕹️cube-tube
|
cp -R ../🕹️cube-tube ./cube-tube
|
||||||
|
exec ./dragonruby-publish --only-package cube-tube
|
||||||
|
rmdir -R ./cube-tube
|
||||||
|
|
@ -39,7 +39,9 @@ class MenuScene < SceneInstance
|
||||||
text(option[:key])
|
text(option[:key])
|
||||||
end
|
end
|
||||||
|
|
||||||
if (args.state.tick_count - @first_render) < 60 * (1.5 + i) * 0.2
|
scramble = (args.state.tick_count - @first_render) < 60 * (1.5 + i) * 0.2
|
||||||
|
|
||||||
|
if scramble
|
||||||
if args.state.tick_count % 4 == 0
|
if args.state.tick_count % 4 == 0
|
||||||
@rand_strings[i] = (0...(rand(text.length >= 3 ? text.length : 3) + 3)).map { ('A'..'Z').to_a[rand(26)] }.join
|
@rand_strings[i] = (0...(rand(text.length >= 3 ? text.length : 3) + 3)).map { ('A'..'Z').to_a[rand(26)] }.join
|
||||||
end
|
end
|
||||||
|
|
@ -73,7 +75,7 @@ class MenuScene < SceneInstance
|
||||||
|
|
||||||
button_border = { w: 340, h: 80, x: l.x - 170, y: l.y - 55 }.merge(WHITE)
|
button_border = { w: 340, h: 80, x: l.x - 170, y: l.y - 55 }.merge(WHITE)
|
||||||
# (args.outputs.borders << button_border) if mobile?
|
# (args.outputs.borders << button_border) if mobile?
|
||||||
if args.inputs.mouse.up && args.inputs.mouse.inside_rect?(button_border)
|
if args.inputs.mouse.up && args.inputs.mouse.inside_rect?(button_border) && !scramble
|
||||||
o = @menu_options.find { |o| o[:key] == l[:key] }
|
o = @menu_options.find { |o| o[:key] == l[:key] }
|
||||||
Sound.play(args, :menu)
|
Sound.play(args, :menu)
|
||||||
o[:on_select].call(args) if o
|
o[:on_select].call(args) if o
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue