- Fix parentscript missing from npc's - Reworked save/load data - Character data, player coins, character inventory and equipped items now properly saved and loaded
30 lines
677 B
C#
30 lines
677 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
|
|
[System.Serializable]
|
|
public class EquipmentData
|
|
{
|
|
public int[] equippedItems;
|
|
|
|
public EquipmentData()
|
|
{
|
|
equippedItems = new int[GameConstants.Sizes.TotalEquipmentSlots];
|
|
|
|
for (int i = 0; i < equippedItems.Length; i++)
|
|
{
|
|
equippedItems[i] = -1;
|
|
}
|
|
}
|
|
public EquipmentData(int[] equippedItems)
|
|
{
|
|
this.equippedItems = new int[GameConstants.Sizes.TotalEquipmentSlots];
|
|
|
|
for (int i = 0; i < equippedItems.Length; i++)
|
|
{
|
|
this.equippedItems[i] = equippedItems[i];
|
|
}
|
|
}
|
|
}
|