Files
XRLib/Assets/Scripts/Simulator/Components/QueueComponent.cs

55 lines
1.5 KiB
C#
Raw Permalink Normal View History

2025-11-04 11:02:02 +09:00
using Simulator.Model;
using System;
using System.Collections.Generic;
using UnityEngine;
using UVC.Data.Core;
namespace Simulator.Data
{
public class QueueComponent : ComponentBase
{
QueueDataClass queueData;
public GameObject entitySocket;
public void SetComponent(QueueDataClass queueData)
{
this.queueData = queueData;
data = queueData;
2026-01-16 11:36:54 +09:00
FitCollider();
2026-02-03 11:40:26 +09:00
SetPosition();
SetRotation();
2025-11-04 11:02:02 +09:00
}
public override void GetModelData(DataObject modelData)
{
Debug.Log("실행되어선 안되는 함수입니다");
}
2026-02-23 17:06:38 +09:00
public override void SetEntity(string key, string name = "")
{
2026-02-26 14:04:33 +09:00
var entity=EntityManager.Instance.GetEntity(key, name);
2026-02-23 17:06:38 +09:00
PlaceEntity(entity);
}
2025-11-04 11:02:02 +09:00
public void PlaceEntity(Entity entity)
{
if (entitySocket == null)
{
return;
}
entity.transform.SetParent(entitySocket.transform, worldPositionStays: false);
float stepZ = EntityManager.Instance.ObjectSize.z;
entity.transform.localPosition = new Vector3(0f, 0f, 0f);
entity.transform.localRotation = Quaternion.identity;
}
2026-01-16 11:36:54 +09:00
2026-02-25 16:30:12 +09:00
protected override void OnDestroy()
{
base.OnDestroy();
}
public override void GetPath()
2026-01-16 11:36:54 +09:00
{
onComponentClicked?.Invoke(componentType, queueData);
}
2025-11-04 11:02:02 +09:00
}
}