diff --git a/scenes/Systems.tscn b/scenes/Systems.tscn index 48cfcc4..f6a8f2d 100644 --- a/scenes/Systems.tscn +++ b/scenes/Systems.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=3 uid="uid://iibqlagufwhm"] +[gd_scene load_steps=9 format=3 uid="uid://iibqlagufwhm"] [ext_resource type="Script" path="res://scripts/System/Systems.gd" id="1_uen2c"] [ext_resource type="Script" path="res://scripts/System/CutsceneSystem.gd" id="2_sf62c"] @@ -7,6 +7,7 @@ [ext_resource type="Script" path="res://scripts/System/VNSystem.gd" id="5_22p3i"] [ext_resource type="Script" path="res://scripts/System/PauseSystem.gd" id="6_hdi8m"] [ext_resource type="Script" path="res://scripts/System/BattleSystem.gd" id="7_miqgj"] +[ext_resource type="Script" path="res://scripts/System/CookingSystem.gd" id="7_nou1j"] [node name="Systems" type="Node3D"] script = ExtResource("1_uen2c") @@ -26,5 +27,8 @@ script = ExtResource("5_22p3i") [node name="Pause" type="Node3D" parent="."] script = ExtResource("6_hdi8m") +[node name="Cooking" type="Node" parent="."] +script = ExtResource("7_nou1j") + [node name="Battle" type="Node" parent="."] script = ExtResource("7_miqgj") diff --git a/scripts/Cooking/CookingGame.gd b/scripts/Cooking/CookingGame.gd new file mode 100644 index 0000000..e09d809 --- /dev/null +++ b/scripts/Cooking/CookingGame.gd @@ -0,0 +1,6 @@ +class_name CookingGame +const VerticalSlice = preload("res://scripts/Cooking/Recipe/VerticalSlice.gd"); + +var recipe:CookingRecipe = null; +func _init(recipe:CookingRecipe) -> void: + self.recipe = recipe; diff --git a/scripts/Cooking/Recipe/CookingRecipe.gd b/scripts/Cooking/Recipe/CookingRecipe.gd new file mode 100644 index 0000000..409e980 --- /dev/null +++ b/scripts/Cooking/Recipe/CookingRecipe.gd @@ -0,0 +1,4 @@ +class_name CookingRecipe + +func _init() -> void: + pass \ No newline at end of file diff --git a/scripts/Cooking/Recipe/VerticalSlice.gd b/scripts/Cooking/Recipe/VerticalSlice.gd new file mode 100644 index 0000000..0afde4c --- /dev/null +++ b/scripts/Cooking/Recipe/VerticalSlice.gd @@ -0,0 +1,4 @@ +class_name VerticalSlice extends "res://scripts/Cooking/Recipe/CookingRecipe.gd" + +func _init() -> void: + super._init(); \ No newline at end of file diff --git a/scripts/Entities/TestNPCController.gd b/scripts/Entities/TestNPCController.gd index d38c713..3c3eb39 100644 --- a/scripts/Entities/TestNPCController.gd +++ b/scripts/Entities/TestNPCController.gd @@ -1,11 +1,15 @@ class_name TestNPCController extends "res://scripts/Entities/OverworldEntity.gd" const TestCutscene = preload("res://scripts/Cutscene/TestCutscene.gd") -func interact(interactor) -> void: - var battle = Battle.new(); - getSystems().BATTLE.startBattle(battle); +func interact(interactor:OverworldEntity) -> void: + # var battle = Battle.new(); + # getSystems().BATTLE.startBattle(battle); + + var game = CookingGame.new(VerticalSlice.new()); + getSystems().COOKING.setCookingGame(game); + # getSystems().CUTSCENE.setCurrentCutscene(TestCutscene.new(interactor, self)); pass -func updateMovement(delta) -> void: - pass \ No newline at end of file +func updateMovement(delta:float) -> void: + pass diff --git a/scripts/System/CookingSystem.gd b/scripts/System/CookingSystem.gd new file mode 100644 index 0000000..549ae22 --- /dev/null +++ b/scripts/System/CookingSystem.gd @@ -0,0 +1,11 @@ +class_name CookingSystem extends Node; +const CookingGame = preload("res://scripts/Cooking/CookingGame.gd"); + +var game:CookingGame = null; + +func getSystems(): + return get_tree().current_scene.get_node("Systems"); + +func setCookingGame(game:CookingGame): + self.game = game; + print("CookingSystem: CookingGame set"); \ No newline at end of file diff --git a/scripts/System/Systems.gd b/scripts/System/Systems.gd index de6bcf6..ff5239f 100644 --- a/scripts/System/Systems.gd +++ b/scripts/System/Systems.gd @@ -5,6 +5,7 @@ const QuestSystem = preload("res://scripts/System/QuestSystem.gd"); const VNSystem = preload("res://scripts/System/VNSystem.gd"); const PauseSystem = preload("res://scripts/System/PauseSystem.gd"); const BattleSystem = preload("res://scripts/System/BattleSystem.gd"); +const CookingSystem = preload("res://scripts/System/CookingSystem.gd"); var ITEM:ItemSystem; var CUTSCENE:CutsceneSystem; @@ -12,6 +13,7 @@ var QUEST:QuestSystem; var VN:VNSystem; var PAUSE:PauseSystem; var BATTLE:BattleSystem; +var COOKING:CookingSystem; func _ready(): ITEM = $Item; @@ -20,6 +22,7 @@ func _ready(): VN = $VN; PAUSE = $Pause; BATTLE = $Battle; + COOKING = $Cooking; func _process(delta): pass