[정영민] 아즈텍 프로젝트 OCTOPUS TWIN 템플릿 적용

26.02.26
- XRLib 추가 및 적용
- 아즈텍 프로젝트 OCTOPUS TWIN 템플릿 적용
This commit is contained in:
정영민
2026-02-26 17:26:55 +09:00
parent 0fdf9c2b3b
commit 986886a260
2428 changed files with 3851604 additions and 16001 deletions

View File

@@ -0,0 +1,38 @@
using System.Collections.Generic;
using UnityEngine;
namespace AZTECHWB
{
public class Building : MonoBehaviour
{
public List<Floor> floors = new List<Floor>();
public Roof roof;
public void Init()
{
roof = transform.GetComponentInChildren<Roof>(true);
FindAllFloors();
}
void FindAllFloors()
{
var childCount = transform.childCount;
for (int i = 0; i < childCount; ++i)
{
var child = transform.GetChild(i);
if (child.TryGetComponent<Floor>(out var floor))
{
floor.Init();
floors.Add(floor);
floor.floorIndex = i;
}
}
}
public void ActiveRoof(bool isActive)
{
roof.gameObject.SetActive(isActive);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0da7b8df1e0536c439fbc4acd38d48c1

View File

@@ -0,0 +1,25 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace AZTECHWB
{
public class Floor : MonoBehaviour
{
public int floorIndex;
public List<Machine> machines = new();
public bool isEmptyFloor;
public void Init()
{
machines = transform.GetComponentsInChildren<Machine>(true).ToList();
foreach(var machine in machines)
{
machine.Init();
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9d9b3ae23a75e404d8a1ba6d5fbfb0c7

View File

@@ -0,0 +1,34 @@
using AZTECHWB.Extensions;
using System.Collections.Generic;
using UnityEngine;
namespace AZTECHWB
{
public class Machine : MonoBehaviour
{
private Dictionary<Component, MeshRenderer[]> meshGroupCache = new();
public MachineStatusItem machineStatusItem;
public string machineName;
private bool isAlarmActive;
public string[] typeOptions;
public Sprite previewImage;
public Vector3 centerPos;
public float focusDistance;
public float focusAzimuth;
public float focusElevation;
public void Init()
{
centerPos = transform.GetMeshCenter();
}
public void SetAlarm(string state)
{
isAlarmActive = state == "SET" ? true : false;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a9e8b536ba47c894da61cf9d680353d9

View File

@@ -0,0 +1,6 @@
using UnityEngine;
public class Roof : MonoBehaviour
{
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6e093f998e1d5444794dfffc794ae664

View File

@@ -0,0 +1,39 @@
using UnityEngine;
public class WarningLight : MonoBehaviour
{
public Transform currentLight;
public Transform RedLight;
public Transform YellowLight;
public Transform GreenLight;
private void Awake()
{
RedLight = transform.Find("WarningLightRed").GetChild(0);
YellowLight = transform.Find("WarningLightYellow").GetChild(0);
GreenLight = transform.Find("WarningLightGreen").GetChild(0);
}
public void SetCurrentLight(Transform light)
{
if (currentLight != light && currentLight != null)
{
currentLight.gameObject.SetActive(false);
}
currentLight = light;
currentLight.gameObject.SetActive(true);
}
public void SetYellowLightActive()
{
SetCurrentLight(YellowLight);
}
public void SetGreenLightActvie()
{
SetCurrentLight(GreenLight);
}
public void SetRedLightActvie()
{
SetCurrentLight(RedLight);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 032807d483d94f44fae2eca28705557f