Commit 860021db authored by Isa's avatar Isa
Browse files
parents 0bd42707 b08cddbc
......@@ -14,6 +14,8 @@ public class SavePoint : MonoBehaviour
private void Start()
{
isUsed = false;
button.interactable = false;
anim = GetComponent<Animator>();
//options = gameObject.transform.Find("Options");
}
......
......@@ -13,7 +13,6 @@ namespace SavePointListScript
{
spl = this;
savePointList = GameObject.FindGameObjectsWithTag("Respawn");
Debug.Log(savePointList.Length);
}
public bool[] GetIsActivList()
......@@ -21,7 +20,6 @@ namespace SavePointListScript
if (savePointList.Length > 0)
{
bool[] savePointIsActiv = new bool[savePointList.Length];
Debug.Log(savePointIsActiv.Length);
int i = 0;
foreach (GameObject var in savePointList)
{
......@@ -36,10 +34,9 @@ namespace SavePointListScript
public void SetIsActivList(bool[] savePointIsActiv)
{
int i = 0;
Debug.Log(savePointIsActiv.Length);
foreach (GameObject var in savePointList)
{
Debug.Log(var);
Debug.Log(savePointIsActiv[i]);
SavePoint temp = savePointList[i].GetComponent<SavePoint>();
temp.SetIsUsed(savePointIsActiv[i]);
i++;
......
......@@ -30,6 +30,7 @@ public class SaveSystem
FileStream stream = new FileStream(path, FileMode.Open);
SavePointData data = formatter.Deserialize(stream) as SavePointData;
Debug.Log(data.savePointIsActiv);
if (data.savePointIsActiv != null)
{
SavePointList.spl.SetIsActivList(data.savePointIsActiv);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment