Skip to content
Snippets Groups Projects
Commit 78231cb1 authored by Kyaw Aung's avatar Kyaw Aung
Browse files

WIP currency implementation

parent 02dfd765
No related branches found
No related tags found
No related merge requests found
......@@ -18,25 +18,25 @@ dock_filesystem_v_split_offset=0
dock_filesystem_display_mode=0
dock_filesystem_file_sort=0
dock_filesystem_file_list_display_mode=1
dock_filesystem_selected_paths=PackedStringArray("res://scenes/game.tscn")
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scripts/run_data/", "res://scenes/")
dock_filesystem_selected_paths=PackedStringArray("res://assets/noise/")
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/run_data/", "res://assets/")
dock_3="Scene,Import"
dock_4="FileSystem"
dock_5="Inspector,Node,History"
[EditorNode]
open_scenes=PackedStringArray("res://main.tscn", "res://scenes/scene_manager.tscn", "res://scenes/game.tscn", "res://scenes/ui/pop_up_label.tscn")
current_scene="res://scenes/ui/pop_up_label.tscn"
open_scenes=PackedStringArray("res://main.tscn", "res://scenes/scene_manager.tscn", "res://scenes/game.tscn", "res://scenes/ui/pop_up_label.tscn", "res://scenes/Pawn.tscn")
current_scene="res://scenes/game.tscn"
center_split_offset=0
selected_default_debugger_tab_idx=1
selected_main_editor_idx=2
selected_bottom_panel_item=1
selected_bottom_panel_item=0
[ScriptEditor]
open_scripts=["res://scripts/game.gd", "res://scripts/main/main.gd", "res://scripts/Pawn.gd", "res://scripts/ui/pop_up_label.gd", "res://scripts/Queen.gd", "res://scripts/run_data/run_data.gd", "res://scripts/scene_manager.gd", "res://scripts/title_screen/title_screen.gd"]
selected_script="res://scripts/ui/pop_up_label.gd"
open_scripts=["res://scripts/Assassin.gd", "res://scripts/game.gd", "res://scripts/main/main.gd", "res://scripts/Pawn.gd", "res://scripts/Piece.gd", "res://scripts/ui/pop_up_label.gd", "res://scripts/Queen.gd", "res://scripts/run_data/run_data.gd", "res://scripts/scene_manager.gd", "res://scripts/title_screen/title_screen.gd"]
selected_script="res://scripts/game.gd"
open_help=[]
script_split_offset=70
list_split_offset=0
......
......@@ -175,4 +175,4 @@ Anim={
"zfar": 4000.01,
"znear": 0.05
}
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Main/SceneManager")])
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Game/PieceContainer")])
......@@ -175,4 +175,4 @@ Anim={
"zfar": 4000.01,
"znear": 0.05
}
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@16886/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Main/SceneManager")])
selected_nodes=Array[NodePath]([])
......@@ -11,8 +11,8 @@ create_new_node=Rect2(510, 264, 900, 700)
[recent_files]
scenes=["res://scenes/Pawn.tscn", "res://scenes/Queen.tscn", "res://scenes/ui/pop_up_label.tscn", "res://scenes/Assassin.tscn", "res://scenes/game.tscn", "res://scenes/scene_manager.tscn", "res://main.tscn"]
scripts=["res://scripts/main/main.gd", "res://scripts/run_data/run_data.gd", "res://scripts/title_screen/title_screen.gd", "res://scripts/Pawn.gd", "res://scripts/Queen.gd", "res://scripts/ui/pop_up_label.gd", "res://scripts/Assassin.gd", "res://scripts/scene_manager.gd", "res://scripts/game.gd"]
scenes=["res://scenes/Pawn.tscn", "res://scenes/Assassin.tscn", "res://scenes/Queen.tscn", "res://scenes/ui/pop_up_label.tscn", "res://scenes/game.tscn", "res://scenes/scene_manager.tscn", "res://main.tscn"]
scripts=["res://scripts/Piece.gd", "res://scripts/Assassin.gd", "res://scripts/main/main.gd", "res://scripts/run_data/run_data.gd", "res://scripts/title_screen/title_screen.gd", "res://scripts/Pawn.gd", "res://scripts/Queen.gd", "res://scripts/ui/pop_up_label.gd", "res://scripts/scene_manager.gd", "res://scripts/game.gd"]
[script_setup]
......
......@@ -3,11 +3,11 @@
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 29,
"column": 36,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 352,
"scroll_position": 18.0,
"row": 365,
"scroll_position": 345.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
......@@ -35,7 +35,7 @@ state={
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 54,
"scroll_position": 35.0,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
......@@ -63,7 +63,7 @@ state={
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"scroll_position": 87.0,
"scroll_position": 86.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
......@@ -77,7 +77,7 @@ state={
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"scroll_position": 48.0,
"scroll_position": 33.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
......@@ -101,11 +101,11 @@ state={
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 25,
"column": 15,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 11,
"scroll_position": 0.0,
"row": 24,
"scroll_position": 2.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
......@@ -123,3 +123,17 @@ state={
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://scripts/Piece.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 0,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 0,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
......@@ -351,7 +351,7 @@ func remove_piece(x,y):
explosion_effect.position = child.position + translate()
explosion_effect.restart()
var piece = child.duplicate()
if is_opponent(x, y):
opponent_piece_count += 1
......
......@@ -2,7 +2,7 @@ extends Node
var scene_manager: Node = null
var run_currency: int = 0
var currency: int = 0
var enchantments: Array = []
var pieces: Array = []
......@@ -10,10 +10,19 @@ func _ready() -> void:
pass # Replace with function body.
func reset_run() -> void:
run_currency = 0
currency = 0
enchantments.clear()
pieces.clear()
func start_run():
reset_run()
scene_manager.change_scene("res://scenes/game.tscn")
func add_currency(piece: Node2D) -> void:
var piece_type = piece.get_class()
if piece is Pawn:
currency += 1
print(piece_type)
print("Total currency: ", currency)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment