|
@@ -163,7 +163,7 @@ public class WallCreate : MonoBehaviour
|
|
|
var w = wall.transform.GetChild(i);
|
|
|
if(w.gameObject.activeSelf == true)
|
|
|
{
|
|
|
- currentWall = new Wall { id = Convert.ToUInt32(4000000000 + Walls.Count),location_id = location_id, start_width = w.position.x, start_height = w.position.z, end_width = w.localScale.x, end_height = w.localScale.z, go = wall };
|
|
|
+ currentWall = new Wall { id = Convert.ToUInt32(4000000000 + Walls[location_id].Count),location_id = location_id, start_width = w.position.x, start_height = w.position.z, end_width = w.localScale.x, end_height = w.localScale.z, go = wall };
|
|
|
Walls[location_id].Add(currentWall);
|
|
|
}
|
|
|
}
|
|
@@ -172,7 +172,7 @@ public class WallCreate : MonoBehaviour
|
|
|
//if (mode == Mode.Room) Rooms.Add(currentWall);
|
|
|
if (mode == Mode.Wall)
|
|
|
{
|
|
|
- currentWall = new Wall { id =Convert.ToUInt32(4000000000 + Walls.Count), start_width = wall.transform.position.x, start_height = wall.transform.position.z, end_width = wall.transform.localScale.x, end_height = wall.transform.localScale.z, go = wall };
|
|
|
+ currentWall = new Wall { id =Convert.ToUInt32(4000000000 + Walls[location_id].Count), start_width = wall.transform.position.x, start_height = wall.transform.position.z, end_width = wall.transform.localScale.x, end_height = wall.transform.localScale.z, go = wall, location_id=location_id };
|
|
|
Debug.Log($"new wall save id {currentWall.id} x {currentWall.start_width} z {currentWall.start_height} x2 {currentWall.end_width} z2 {currentWall.end_height} location_id {currentWall.location_id}");
|
|
|
Walls[location_id].Add(currentWall);
|
|
|
}
|
|
@@ -243,7 +243,7 @@ public class WallCreate : MonoBehaviour
|
|
|
zone.GetComponent<ZoneController>().TextMesh.text = $"Зона {Zones[location_id].Count+1}";
|
|
|
var active_zone = Zones[location_id].Count;
|
|
|
|
|
|
- if(z == null) z = new Zone { id= Convert.ToUInt32(4000000000 + Zones.Count), go=zone, buttons = panel_button, location_id=(uint) location_id };
|
|
|
+ if(z == null) z = new Zone { id= Convert.ToUInt32(4000000000 + Zones[location_id].Count), go=zone, buttons = panel_button, location_id=(uint) location_id };
|
|
|
else
|
|
|
{
|
|
|
zone.transform.position = new Vector3(z.start_width, 0.05f, z.start_height);
|