using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class WalletPanel : MonoBehaviour { public GameObject woniuConnect; public GameObject wokeConnect; public GameObject woniuSc; public GameObject wokeSc; public Button woniuBtn; public Button wokeBtn; public GameObject Musk; // Start is called before the first frame update void Start() { woniuBtn.onClick.AddListener(WoniuClick); wokeBtn.onClick.AddListener(WokeClick); } void Init() { } void WoniuClick() { woniuBtn.transform.SetParent(this.transform); wokeBtn.transform.SetParent(Musk.transform); woniuSc.gameObject.SetActive(true); wokeSc.gameObject.SetActive(false); } void WokeClick() { woniuBtn.transform.SetParent(Musk.transform); wokeBtn.transform.SetParent(this.transform); woniuSc.gameObject.SetActive(false); wokeSc.gameObject.SetActive(true); } // Update is called once per frame void Update() { } }