66 lines
1.2 KiB
C#
66 lines
1.2 KiB
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
using UnityEngine.UI;
|
||
|
||
public class RobotManager : CabinetUIBase
|
||
{
|
||
public static RobotManager Instance { get; private set; }
|
||
|
||
public Animator animator;
|
||
public GameObject robot_object;
|
||
|
||
public Button close_button;
|
||
public GameObject video_canvas;
|
||
private void Awake()
|
||
{
|
||
Instance = this;
|
||
}
|
||
|
||
private void Start()
|
||
{
|
||
close_button.onClick.AddListener(() =>
|
||
{
|
||
HideVideo();
|
||
});
|
||
}
|
||
|
||
public void ShowRobot()
|
||
{
|
||
robot_object.SetActive(true);
|
||
}
|
||
|
||
public void HideRobot()
|
||
{
|
||
robot_object.SetActive(false);
|
||
}
|
||
|
||
public void DoAnimation()
|
||
{
|
||
animator.SetBool("move", true);
|
||
}
|
||
|
||
public void ShowVideo()
|
||
{
|
||
video_canvas.SetActive(true);
|
||
}
|
||
|
||
public void HideVideo()
|
||
{
|
||
video_canvas.SetActive(false);
|
||
}
|
||
|
||
public override void OnMenuChanged(Menu menu)
|
||
{
|
||
base.OnMenuChanged(menu);
|
||
if (menu == Menu.M_Êý×Ö»ú·¿_ÖÇÄÜѲ¼ì)
|
||
{
|
||
ShowRobot();
|
||
}
|
||
else
|
||
{
|
||
HideRobot();
|
||
}
|
||
}
|
||
}
|