-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was a refactoring release: + Rename Captain's Log to Database + Revamp the menu scene + Add Loading Scene for loading game map + Add crossfade effect transitions + Make generated maps create JSON, then load as if it was a save + Revised card creation process (no code involved) + Added game version info
- Loading branch information
Showing
41 changed files
with
700 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"height": 1, | ||
"offset": {"x": 0, "y": -32} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"height": 1, | ||
"offset": {"x": 0, "y": -32} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"height": 0, | ||
"offset": {"x": 0, "y": -32} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"height": 1, | ||
"offset": {"x": 0, "y": -32} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"height": 0, | ||
"offset": {"x": 0, "y": -32} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"height": 1, | ||
"offset": {"x": 0, "y": -32} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
extends "res://components/controller/default_controller.gd" | ||
|
||
const COLOR_SELECTED = Color(234.0/255,166.0/255,81.0/255) | ||
const COLOR_UNSELECTED = Color(1,1,1) | ||
|
||
var choice | ||
var choice_list_size | ||
var cursor | ||
var saves_node | ||
|
||
onready var menu = get_parent() | ||
|
||
func _ready(): | ||
choice = 1 # default to new route choice | ||
self.disable() | ||
|
||
func setup(): | ||
saves_node = menu.saves_node | ||
cursor = saves_node.get_node("cursor") | ||
cursor.show() | ||
choice_list_size = saves_node.get_child_count() - 1 | ||
self.enable() | ||
self.update_choice() | ||
|
||
func update_choice(): | ||
# updates cursor position | ||
# should play a sfx eventually too | ||
cursor.set_pos(Vector2(-32, ((choice-1) * 32) - 4)) | ||
print(saves_node.get_child(choice)) | ||
for btn in saves_node.get_children(): | ||
if btn != cursor: | ||
if btn == saves_node.get_child(choice): | ||
btn.add_color_override("font_color", COLOR_SELECTED) | ||
else: | ||
btn.add_color_override("font_color", COLOR_UNSELECTED) | ||
|
||
func event_up(): | ||
choice = ((choice + choice_list_size - 2) % choice_list_size) + 1 | ||
update_choice() | ||
|
||
func event_down(): | ||
choice = (choice % choice_list_size) + 1 | ||
update_choice() | ||
|
||
func event_select(): | ||
var selection = saves_node.get_child(choice) | ||
assert(selection != cursor) # redundant check yay | ||
self.disable() | ||
cursor.hide() | ||
selection.emit_signal("selected") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
[gd_scene load_steps=2 format=1] | ||
[gd_scene load_steps=3 format=1] | ||
|
||
[ext_resource path="res://assets/fonts/PressStart2P-small.fnt" type="Font" id=1] | ||
[ext_resource path="res://assets/fonts/PressStart2P-small.fnt" type="BitmapFont" id=1] | ||
|
||
[node name="menu_button" type="Button"] | ||
[sub_resource type="GDScript" id=1] | ||
|
||
margin/right = 12.0 | ||
margin/bottom = 19.0 | ||
script/source = "\nextends Label\n\nsignal selected(info)\n" | ||
|
||
[node name="menu_button" type="Label"] | ||
|
||
rect/min_size = Vector2( 0, 28 ) | ||
focus/ignore_mouse = false | ||
focus/stop_mouse = true | ||
size_flags/horizontal = 2 | ||
size_flags/vertical = 2 | ||
margin/left = 0.0 | ||
margin/top = 0.0 | ||
margin/right = 256.0 | ||
margin/bottom = 35.0 | ||
custom_fonts/font = ExtResource( 1 ) | ||
toggle_mode = false | ||
flat = false | ||
text = "load file" | ||
valign = 1 | ||
percent_visible = 1.0 | ||
lines_skipped = 0 | ||
max_lines_visible = 1 | ||
script/script = SubResource( 1 ) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
extends Object | ||
|
||
static func get_file_as_text(filepath): | ||
var datafile = File.new() | ||
var datatext | ||
datafile.open(filepath, File.READ) | ||
datatext = datafile.get_as_text() | ||
datafile.close() | ||
return datatext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.