Started cutscene system

This commit is contained in:
2025-01-05 15:30:00 -06:00
parent e74878eb80
commit 0554f5719d
11 changed files with 135 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
class_name CutsceneSystem extends Node
const Cutscene = preload("res://scripts/Cutscene/Cutscene.gd");
var currentCutscene:Cutscene = null;
func _process(delta: float) -> void:
if currentCutscene != null:
currentCutscene.update(delta);
func _exit_tree() -> void:
if currentCutscene != null:
currentCutscene.clear();
func setCurrentCutscene(cutscene:Cutscene) -> void:
if currentCutscene != null:
currentCutscene.clear();
currentCutscene = cutscene;
currentCutscene.setupCutscene();

View File

@@ -1,4 +1,4 @@
class_name ItemSystem
class_name ItemSystem extends Node
const Item = preload("res://scripts/Items/Item.gd");
const ItemStack = preload("res://scripts/Items/ItemStack.gd");
@@ -17,7 +17,7 @@ class ItemStackTypeComparator:
# Constants
const ITEM_STACK_SIZE_MAX = 99;
var ITEM_POTION = preload("res://scripts/Items/Potion.gd").new()
var ITEM_POTION = preload("res://scripts/Items/Potion.gd").new();
var inventory:Array[ItemStack] = [];
# Methods

View File

@@ -1,3 +1,14 @@
class_name Systems extends Node
const ItemSystem = preload("res://scripts/Systems/ItemSystem.gd");
const CutsceneSystem = preload("res://scripts/Systems/CutsceneSystem.gd")
var ITEM = preload("res://scripts/Systems/ItemSystem.gd").new()
var ITEM:ItemSystem;
var CUTSCENE:CutsceneSystem;
func _ready():
ITEM = $Item;
CUTSCENE = $Cutscene;
pass
func _process(delta):
pass