📝 Added documentation

This commit is contained in:
2025-11-25 13:46:46 +01:00
parent b4013b1ff2
commit 638ebaff46
3 changed files with 16 additions and 1 deletions
+7
View File
@@ -12,6 +12,7 @@ namespace Babushka.scripts.CSharp.Common.Temp;
public partial class MVPDuck : Node2D, ISaveable
{
[ExportGroup("Persistence")]
// A container for the current scene. Used to automatically add the current scene context to the save ID.
[Export] public VariableResource _sceneKeyProvider;
[ExportGroup("Animation")]
@@ -56,6 +57,9 @@ public partial class MVPDuck : Node2D, ISaveable
#region SAVE AND LOAD
/// <summary>
// Saves duck position.
/// </summary>
public void UpdateSaveData()
{
var payloadData = new Dictionary<string, Variant>
@@ -69,6 +73,9 @@ public partial class MVPDuck : Node2D, ISaveable
SavegameService.AppendDataToSave(_sceneKeyProvider.Payload.AsString(), id, payloadData);
}
/// <summary>
/// Loads duck position.
/// </summary>
public void LoadFromSaveData()
{
var sceneName = _sceneKeyProvider.Payload.AsString();