Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
psychowolf960 committed May 3, 2024
1 parent 1a7bbe8 commit 8d6cbdc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .godot/editor/editor_layout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ current_scene="res://scenes/mainmenu.tscn"
center_split_offset=-288
selected_default_debugger_tab_idx=0
selected_main_editor_idx=2
selected_bottom_panel_item=0
selected_bottom_panel_item=1

[ScriptEditor]

Expand Down
1 change: 1 addition & 0 deletions .godot/editor/filesystem_update4
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
res://scenes/mainmenu.tscn
res://scripts/mainmenu.gd
6 changes: 3 additions & 3 deletions .godot/editor/script_editor_cache.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ state={
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 30,
"column": 0,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 46,
"scroll_position": 18.0,
"row": 25,
"scroll_position": 5.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
10 changes: 5 additions & 5 deletions scripts/mainmenu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func animate_sliding(direction: String):
if direction == "right":
_start_animation_right()

var worlds = [world_1, world_2, world_3, world_4]
@onready var worlds = [world_1, world_2, world_3, world_4]
var world_indices = {world_1: 1, world_2: 2, world_3: 3, world_4: 4}
var animation_in_progress = false

Expand All @@ -33,16 +33,16 @@ func _start_animation_right():
world_indices[world] += 1
for world in worlds:
if world_indices[world] == 1:
world.set_position(Vector2(-185, 0))
world.rect_position = Vector2(-185, 0)
world.show()
elif world_indices[world] == 2:
world.set_position(Vector2(0, 0))
world.rect_position = Vector2(0, 0)
world.show()
elif world_indices[world] == 3:
world.set_position(Vector2(185, 0))
world.rect_position = Vector2(185, 0)
world.show()
elif world_indices[world] == 4:
world.set_position(Vector2(185, 0))
world.rect_position = Vector2(185, 0)
world.hide()
animation_in_progress = false

Expand Down

0 comments on commit 8d6cbdc

Please sign in to comment.