powerfun-unity/Assets/Scripts/UI/Prefab/Panel/UserInfoController.cs

33 lines
805 B
C#
Raw Normal View History

2021-03-25 16:53:39 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
2021-03-29 09:10:59 +08:00
using UnityEngine.UI;
2021-03-25 16:53:39 +08:00
2021-03-30 14:23:41 +08:00
public class UserInfoController : PFUIPanel
2021-03-25 16:53:39 +08:00
{
// Start is called before the first frame update
2021-03-30 14:23:41 +08:00
protected override void Start()
2021-03-25 16:53:39 +08:00
{
this.transform.localPosition = new Vector3(0, 0, 0);
2021-03-29 09:10:59 +08:00
Button exitBtn = this.transform.Find("InfoPanel").Find("Button").GetComponent<Button>();
exitBtn.onClick.AddListener(() =>
{
UIManager.ShowHomePanel();
});
2021-03-30 14:23:41 +08:00
Button editBtn = this.transform.Find("InfoPanel").Find("EditButton").GetComponent<Button>();
editBtn.onClick.AddListener(() =>
{
UIManager.ShowEditUserPanel();
});
2021-03-25 16:53:39 +08:00
}
// Update is called once per frame
void Update()
{
}
}