Files
EnglewoodLAB/Assets/Scripts/Command/ObjectCommand/ChangedFloorCommand.cs
SOOBEEN HAN f1894889ee <refactor> Octopus Twin 템플릿 적용
- 기능 외 UI 구조만 적용
- 프로젝트에 걸맞는 UI는 재작업 필요
2026-02-23 18:20:09 +09:00

56 lines
1.7 KiB
C#

using UnityEngine;
using UnityEngine.InputSystem.XR;
using EnglewoodLAB;
using EnglewoodLAB.UI;
using EnglewoodLAB.Management;
using UVC.UI.Commands;
namespace EnglewoodLAB.Command
{
public class ChangedFloorCommand : ICommand
{
private int floorIndex;
private OrbitalController controller;
public ChangedFloorCommand(int floorIndex)
{
this.floorIndex = floorIndex;
controller = AppMain.Instance.cameraController;
}
public async void Execute(object? parameter = null)
{
var uiIsActive = floorIndex == 2 ? true : false;
var targetPos = Vector3.zero;
var curDistance = 0f;
var curElevation = 0f;
var curAzimuth= 0f;
if (uiIsActive)
{
targetPos = new Vector3(17f, 0.05f, -2.806954f);
curDistance = 10f;
curElevation = 23f;
curAzimuth = 305f;
}
else
{
if (SceneMain.Instance.GetManager<EWLUIManager>())
{
var leftSidePanel = SceneMain.Instance.GetManager<EWLUIManager>().GetCanvas<StaticCanvas>().GetPanel<LeftSidePanel>();
leftSidePanel.DeactiveSideToolButton();
}
targetPos = new Vector3(26.7f, 20f, 205.3f);
curDistance = 60f;
curElevation = 56;
curAzimuth = 136f;
}
controller.currentDistance = curDistance;
controller.currentElevation = curElevation;
controller.currentAzimuth = curAzimuth;
controller.SetTargetPos(targetPos);
}
}
}