From 318d2ec9f6a64d45ef44ae5dcfa6de04d2e710fe Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Wed, 27 Dec 2023 20:21:18 +0000
Subject: [PATCH] Fix stop rotate while drilling

---
 Assets/Scripts/SaveData.cs |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/Assets/Scripts/SaveData.cs b/Assets/Scripts/SaveData.cs
index 9af6777..5ee1f34 100644
--- a/Assets/Scripts/SaveData.cs
+++ b/Assets/Scripts/SaveData.cs
@@ -5,13 +5,13 @@
 using UnityEngine;
 
 [Serializable]
-public class SaveData
+public class SaveDataPlayer
 {
     public int maxHealth;
     public int health;
     public float[] position;
     public float[] velocity;
-    public SaveData(PlayerController player)
+    public SaveDataPlayer(PlayerController player)
     {
         maxHealth = player.health.MaxHealth;
         health = player.health.Health;
@@ -19,3 +19,29 @@
         velocity = player.rb.velocity.ConvertToFloatArray();
     }
 }
+
+[Serializable]
+public class SaveDataMap
+{
+    public int seed;
+    public List<DestroyedTile> destroyedTiles;
+    public SaveDataMap(List<Vector3Int> destroyedTiles, int seed)
+    {
+        this.seed = seed;
+        this.destroyedTiles = new List<DestroyedTile>();
+        foreach (var item in destroyedTiles.ConvertToListIntArray())
+        {
+            this.destroyedTiles.Add(new DestroyedTile(item));
+        }
+    }
+}
+
+[Serializable]
+public class DestroyedTile
+{
+    public DestroyedTile(int[] tileCoord)
+    {
+        this.tileCoord = tileCoord;
+    }
+    public int[] tileCoord;
+}

--
Gitblit v1.9.3