mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 08:45:33 +00:00
session settings
This commit is contained in:
parent
c20f90ab8b
commit
62aae84e8f
9 changed files with 37 additions and 1 deletions
|
|
@ -48,4 +48,5 @@ theme = ExtResource("2_wqb8e")
|
|||
theme_override_font_sizes/font_size = 10
|
||||
text = "Back"
|
||||
|
||||
[connection signal="toggled" from="HBoxContainer/CheckBox" to="." method="_on_check_box_toggled"]
|
||||
[connection signal="pressed" from="ScrollContainer/Level Select/BackButton" to="." method="_on_back_button_pressed"]
|
||||
|
|
|
|||
1
Scripts/Components/FSM/EnemyFSMState.cs.uid
Normal file
1
Scripts/Components/FSM/EnemyFSMState.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c20xwj1qfygv4
|
||||
1
Scripts/Components/FSM/FSMStateModule.cs.uid
Normal file
1
Scripts/Components/FSM/FSMStateModule.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://lpxtxygu8wnr
|
||||
1
Scripts/Components/FSM/PlayerFSMState.cs.uid
Normal file
1
Scripts/Components/FSM/PlayerFSMState.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c3cggej0mbv1f
|
||||
|
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||
using Cirno.Scripts;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Godot.Collections;
|
||||
using Cirno.Scripts.Utils;
|
||||
|
||||
public partial class GameManager : Node2D
|
||||
{
|
||||
|
|
@ -99,7 +100,10 @@ public partial class GameManager : Node2D
|
|||
MapStartData = mapStartData;
|
||||
|
||||
StartingEquipment.AddRange(mapStartData.StartingEquipment);
|
||||
|
||||
}
|
||||
|
||||
public void ApplySessionState(SessionSettings settings)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System.Threading.Tasks;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Cirno.Scripts.Utils;
|
||||
using Godot;
|
||||
using GTweens.Builders;
|
||||
using GTweensGodot.Extensions;
|
||||
|
|
@ -12,6 +13,8 @@ public partial class GlobalState : Node
|
|||
|
||||
private ColorRect _fader { get; set; }
|
||||
|
||||
public SessionSettings SessionSettings { get; set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Instance = this;
|
||||
|
|
@ -80,6 +83,10 @@ public partial class GlobalState : Node
|
|||
// Call deferred if it gives issues
|
||||
DeferredAddStartDataToGameManager(startData);
|
||||
}
|
||||
|
||||
if (GameManager.Instance is not null) {
|
||||
GameManager.Instance.ApplySessionState(SessionSettings);
|
||||
}
|
||||
|
||||
FadeIn();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,11 @@ public partial class DebugMenu : MenuBase
|
|||
EmitSignal(SignalName.MenuClosed);
|
||||
}
|
||||
|
||||
private void _on_check_box_toggled(bool state)
|
||||
{
|
||||
GlobalState.Instance.SessionSettings.SkipDialogues = state;
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
|
|
|
|||
15
Scripts/Utils/SessionSettings.cs
Normal file
15
Scripts/Utils/SessionSettings.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cirno.Scripts.Utils;
|
||||
|
||||
public class SessionSettings
|
||||
{
|
||||
public bool SkipDialogues { get; set; } = false;
|
||||
public bool GodMode { get; set; } = false;
|
||||
|
||||
public Dictionary<string,int> Items {get;set;} = new();
|
||||
|
||||
public float Health {get;set;}
|
||||
public float Shield {get;set;}
|
||||
}
|
||||
1
Scripts/Utils/SessionSettings.cs.uid
Normal file
1
Scripts/Utils/SessionSettings.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://djtfoik0lusp
|
||||
Loading…
Add table
Add a link
Reference in a new issue