Merge pull request '[한수빈] 설비 애니메이션 층 마다 재생되도록 변경' (#14) from hsb/260129_00 into main

Reviewed-on: http://220.90.135.190:3000/UVCXR/OCTOPUS_TWIN-Demo/pulls/14
This commit was merged in pull request #14.
This commit is contained in:
2026-01-29 12:22:42 +09:00
6 changed files with 23362 additions and 39588 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4f44df22ffe06894dbbeda031a681d67
guid: 655fc3c3e7244d347842342d73609e6f
DefaultImporter:
externalObjects: {}
userData:

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
using UVC.UI.Commands;
using OCTOPUS_TWIN;
namespace ChunilENG.Command
{
@@ -14,6 +15,30 @@ namespace ChunilENG.Command
{
var building = ChunilENGSceneMain.Instance.building;
building.SetFloor(floorIndex);
var cameraController = ChunilENGAppMain.Instance.cameraController;
var allMachines = building.GetMachines();
if (cameraController.viewMode == ViewMode.TopView)
{
foreach (var machine in allMachines)
{
machine.ReleaseAnimators();
}
return;
}
foreach(var machine in allMachines)
{
if(machine.GetMachineFloorIndex() == floorIndex)
{
machine.AssignAnimators();
}
else
{
machine.ReleaseAnimators();
}
}
}
}
}

View File

@@ -32,9 +32,30 @@ namespace ChunilENG
originScale = gameObject.transform.localScale;
ReleaseAnimators(); // Disable by default
await UniTask.CompletedTask;
}
public void AssignAnimators()
{
if (animators == null) return;
foreach (var animator in animators)
{
if (animator != null) animator.enabled = true;
}
SetAnimationSpeed();
}
public void ReleaseAnimators()
{
if (animators == null) return;
foreach (var animator in animators)
{
if (animator != null) animator.enabled = false;
}
}
public void SetAnimationSpeed()
{
if (animators.Length == 0)
@@ -56,7 +77,7 @@ namespace ChunilENG
animSpeed = 0f;
}
foreach(var animator in animators)
foreach (var animator in animators)
{
animator.speed = animSpeed;
}

View File

@@ -34,13 +34,46 @@ namespace ChunilENG.UI
toolbarModel.AddRadioButton("CameraControlGroup", "Top View", false,
"Prefabs/UI/Toolbar/images/ic_camera_top_on",
"Prefabs/UI/Toolbar/images/ic_camera_top_off_white",
(isSelected) => { if (isSelected) Debug.Log("탑뷰 카메라 선택됨"); },
(isSelected) =>
{
if (isSelected)
{
var building = ChunilENGSceneMain.Instance.building;
if(building != null)
{
foreach(var machine in building.GetMachines())
{
machine.ReleaseAnimators();
}
}
}
},
new CameraViewModeChangedCommand(ViewMode.TopView),
"Top View 시점으로 변경합니다.");
toolbarModel.AddRadioButton("CameraControlGroup", "Quarter View", true,
"Prefabs/UI/Toolbar/images/ic_camera_quarter_on",
"Prefabs/UI/Toolbar/images/ic_camera_quarter_off_white",
(isSelected) => { if (isSelected) Debug.Log("쿼터뷰 카메라 선택됨"); },
(isSelected) =>
{
if (isSelected)
{
var building = ChunilENGSceneMain.Instance.building;
if (building == null) return;
var currentFloorIndex = building.GetCurFloor().index;
foreach (var machine in building.GetMachines())
{
if (machine.GetMachineFloorIndex() == currentFloorIndex)
{
machine.AssignAnimators();
}
else
{
machine.ReleaseAnimators();
}
}
}
},
new CameraViewModeChangedCommand(ViewMode.PerspectiveView),
"Quarter View 시점으로 변경합니다.");