using Assets.Scripts; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ActivityAdController : PFUIPanel { protected override void Awake() { UIManager.AddEvent(transform.Find("Exit").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => { Close(); }); UIManager.AddEvent(transform.Find("LightUpChina/Btn").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => { Close(); //可以传参 //UIManager.ShowActivityPanel(url); ConfigHelper.activityApi.JoinActivity(2); if (string.IsNullOrEmpty(App.CurrentUser.Contact) || string.IsNullOrEmpty(App.CurrentUser.ContactPhone) || string.IsNullOrEmpty(App.CurrentUser.ContactAddress)) { UIManager.ShowAddressPanel(); } else { UIManager.ShowActivityPanel(url); } }); //UIManager.AddEvent(transform.Find("LightUpChina/BtnRule").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => //{ // Application.OpenURL("https://www.baidu.com/"); //}); } string image = null, url = null; public void Initial(string image, string url) { this.image = image; App.ActivityUrl = url; this.url = url; } // Update is called once per frame void Update() { } }