E_ElecCompetition/Electrical_inspectionCompet.../Assets/Adam/Scripts/AssignmentController.cs

51 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
//============================================================
//支持中文文件使用UTF-8编码
//@author YangHua
//@create 20230913
//@company Adam
//
//@description:
//============================================================
namespace Adam
{
public class AssignmentController : MonoBehaviour
{
public GameObject RWPanel;
public RectTransform rws;
public Button loadBtn;
public Vector2 originPos = new Vector2();
private void Start()
{
originPos = rws.anchoredPosition;
loadBtn.onClick.AddListener(OnLoad);
SwitchPanel(false);
}
public void SwitchPanel(bool isActive)
{
RWPanel.SetActive(isActive);
}
public void ChangeRWPanelPos()
{
rws.anchoredPosition = originPos;
}
public void OnLoad()
{
UIManager.Instance.bottomCotroller.SwitchPanel(true);
UIManager.Instance.exitBtn.gameObject.SetActive(true);
rws.anchoredPosition = Vector2.zero;
loadBtn.gameObject.SetActive(false);
SwitchPanel(false);
SceneLoad.Instance.SceneChange("工具间场景");
}
}
}