85 lines
1.9 KiB
C#
85 lines
1.9 KiB
C#
using DG.Tweening;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
|
|
public class Main : Anim
|
|
{
|
|
[Header("主页面个人细节")]
|
|
public Image avater;
|
|
|
|
public Text detail1;
|
|
public Text detail2;
|
|
public Text detail3;
|
|
|
|
public Text Bplevel;
|
|
|
|
[Header("主页面按钮")]
|
|
public Button Honorbtn;
|
|
public Button Firendbtn;
|
|
public Button Packbtn;
|
|
public Button Achbtn;
|
|
public Button Actbtn;
|
|
public Button BPbtn;
|
|
public Button Taskbtn;
|
|
|
|
|
|
public GameObject Top;
|
|
public GameObject left;
|
|
public GameObject right;
|
|
|
|
void Start()
|
|
{
|
|
movechild();
|
|
Invoke("Backchild", 0.5f);
|
|
Honorbtn.onClick.AddListener(() =>
|
|
{
|
|
BTnmove(Honorbtn.gameObject);
|
|
});
|
|
Firendbtn.onClick.AddListener(() =>
|
|
{
|
|
BTnmove(Firendbtn.gameObject);
|
|
});
|
|
Packbtn.onClick.AddListener(() =>
|
|
{
|
|
BTnmove(Packbtn.gameObject);
|
|
});
|
|
Achbtn.onClick.AddListener(() =>
|
|
{
|
|
BTnmove(Achbtn.gameObject);
|
|
});
|
|
Actbtn.onClick.AddListener(() =>
|
|
{
|
|
BTnmove(Actbtn.gameObject);
|
|
});
|
|
BPbtn.onClick.AddListener(() =>
|
|
{
|
|
BTnmove(BPbtn.gameObject);
|
|
});
|
|
Taskbtn.onClick.AddListener(() =>
|
|
{
|
|
BTnmove(Taskbtn.gameObject);
|
|
});
|
|
}
|
|
public void movechild()
|
|
{
|
|
Top.transform.localPosition = new Vector3(0, 292, 0);
|
|
left.transform.localPosition = new Vector3(686, 0, 0);
|
|
right.transform.localPosition = new Vector3(-300, 0, 0);
|
|
}
|
|
public void Backchild()
|
|
{
|
|
MoveToOriginBy(Top);
|
|
MoveToOriginBy(left);
|
|
MoveToOriginBy(right);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|