49 lines
1.8 KiB
C#
49 lines
1.8 KiB
C#
using Cysharp.Threading.Tasks;
|
|
using UnityEngine;
|
|
using UVC.UI.Commands;
|
|
using UVC.UI.Toolbar;
|
|
using UVC.UI.Toolbar.Model;
|
|
using UVC.UI.Toolbar.View;
|
|
|
|
namespace EnglewoodLAB.UI
|
|
{
|
|
public class BottomToolbar : UIPanel
|
|
{
|
|
protected ToolbarView view;
|
|
|
|
public override async UniTask Init()
|
|
{
|
|
if (view == null)
|
|
view = GetComponent<ToolbarView>();
|
|
SetModel();
|
|
|
|
await UniTask.CompletedTask;
|
|
}
|
|
|
|
private void SetModel()
|
|
{
|
|
var toolbarModel = new ToolbarModel();
|
|
var cam = FindFirstObjectByType<OrbitalController>();
|
|
//하위 버튼 모델 추가해야함
|
|
toolbarModel.AddCameraStandardButton("Production Line", "Overall Status", "Prefabs/UI/Toolbar/images/IMG_CameraLineBtn",
|
|
new MoveToLineCommand(cam, new Vector3(-15.89142f, 6.030001f, -4.520169f), 60f, 56f, 136f),
|
|
"Overall Status Line 이동");
|
|
toolbarModel.AddCameraStandardButton("Production Line", "Processing", "Prefabs/UI/Toolbar/images/IMG_CameraLineBtn",
|
|
new MoveToLineCommand(cam, new Vector3(-13.76006f, 6.030001f, -11.54977f), 2f, 5f, 274f)
|
|
, "Processing Line 이동");
|
|
toolbarModel.AddCameraStandardButton("Production Line", "Manufacturing ", "Prefabs/UI/Toolbar/images/IMG_CameraLineBtn",
|
|
new MoveToLineCommand(cam, new Vector3(15.15275f, 6.030001f, -17.83026f), 2f, 5f, 97f)
|
|
, "Manufacturing Line 이동");
|
|
toolbarModel.AddCameraStandardButton("Production Line", "Automated ", "Prefabs/UI/Toolbar/images/IMG_CameraLineBtn",
|
|
new MoveToLineCommand(cam, new Vector3(34.21293f, 1.4941f, -7.274418f), 2f, 5f, 85f)
|
|
, "Automated Line 이동");
|
|
|
|
|
|
|
|
|
|
view.Initialize(toolbarModel);
|
|
}
|
|
}
|
|
|
|
}
|