79 lines
2.0 KiB
C#
79 lines
2.0 KiB
C#
using System;
|
|
using UnityEngine;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.Serialization;
|
|
using Unity.VisualScripting;
|
|
|
|
[Serializable]
|
|
public partial class SaveData
|
|
{
|
|
public string uid;
|
|
public Vector3 position;
|
|
public Quaternion rotation;
|
|
}
|
|
|
|
[Serializable]
|
|
public class SaveableBerryBush : SaveData
|
|
{
|
|
public int blueberryCount;
|
|
public bool BlueBerriesPicked;
|
|
public SaveableBerryBush(string uid, Vector3 position, Quaternion rotation, int blueberryCount, bool blueBerriesPicked)
|
|
{
|
|
this.uid = uid;
|
|
this.position = position;
|
|
this.rotation = rotation;
|
|
this.blueberryCount = blueberryCount;
|
|
this.BlueBerriesPicked = blueBerriesPicked;
|
|
}
|
|
}
|
|
|
|
|
|
[Serializable]
|
|
public class SaveableTwig : SaveData
|
|
{
|
|
public bool collected;
|
|
public SaveableTwig(string uid, Vector3 position, Quaternion rotation, bool collected)
|
|
{
|
|
this.uid = uid;
|
|
this.position = position;
|
|
this.rotation = rotation;
|
|
this.collected = collected;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class SaveableNPC : SaveData
|
|
{
|
|
public bool isActive;
|
|
public bool isCompleted;
|
|
public QuestData dialog;
|
|
|
|
public SaveableNPC(string uid, Vector3 position, Quaternion rotation, bool isActive, bool isCompleted, QuestData dialog)
|
|
{
|
|
this.uid = uid;
|
|
this.position = position;
|
|
this.rotation = rotation;
|
|
this.isActive = isActive;
|
|
this.isCompleted = isCompleted;
|
|
this.dialog = dialog;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class SaveablePlayer : SaveData
|
|
{
|
|
public List<InventoryItem> inventory = new List<InventoryItem>();
|
|
public int blueberryCount;
|
|
public Dialog[] dialog;
|
|
|
|
public SaveablePlayer(string uid, Vector3 position, Quaternion rotation, List<InventoryItem> inventory, int blueberrycount, Dialog[] dialog)
|
|
{
|
|
this.uid = uid;
|
|
this.position = position;
|
|
this.rotation = rotation;
|
|
this.inventory = inventory;
|
|
this.blueberryCount = blueberrycount;
|
|
this.dialog = dialog;
|
|
}
|
|
}
|