Scripts/SceneParams.cs
Станислав Хозяенок 99199eed0d 28.04.2025
2025-04-28 11:31:01 +07:00

74 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
class SceneParams
{
static private SceneParams _instance;
static public SceneParams Instance
{
get
{
if (_instance == null)
{
_instance = new SceneParams();
}
return _instance;
}
}
public class CameraSettings
{
private bool isBlockMove = true;
private bool isBlockZoom = true;
// Запретить переход
public bool IsBlockMove {
get => isBlockMove;
set
{
if (Instance.IsDataHistoryLoaded)
isBlockMove = value;
}
}
public bool IsBlockZoom {
get => isBlockZoom;
set
{
if (Instance.IsDataHistoryLoaded)
isBlockZoom = value;
}
}
public Transform DefaultTransform = null;
public bool IsStartPos { get; set; } = true;
public bool IsAutoRotateCamera { get; set; } = true;
}
public class SpawnMovePoint
{
private bool isSpawnMTEPoint = false;
private bool isSpawnRTLSPoint = false;
public bool IsSpawnMTEPoint { get => isSpawnMTEPoint; set => isSpawnMTEPoint = value; }
public bool IsSpawnRTLSPoint { get => isSpawnRTLSPoint; set => isSpawnRTLSPoint = value; }
}
public class Person
{
private Vector3 startPosition;
public Vector3 StartPosition { get => startPosition; set => startPosition = value; }
}
public CameraSettings cameraSettings = new CameraSettings();
public SpawnMovePoint spawnMovePoint = new SpawnMovePoint();
public Person person = new Person();
public bool IsDataHistoryLoaded { get; set; } = false;
}