1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using Api;
- using Plugins.CxShine.page;
- using UI;
- using UnityEngine;
- using UnityEngine.UI;
- public class BqItemComp : MonoBehaviour
- {
- public GameObject PreparePagePrefab;
- public Text PlayerIdText;
- private Action<PlayerInfo> onClose;
- private PlayerInfo invitePlayer;
- private Action<PlayerInfo> onAccept;
- void Start()
- {
- }
- // Update is called once per frame
- void Update()
- {
- }
- public void init(PlayerInfo invitePlayer, Action<PlayerInfo> onAccept, Action<PlayerInfo> onClose)
- {
- this.invitePlayer = invitePlayer;
- this.onClose = onClose;
- this.onAccept = onAccept;
- PlayerIdText.text = PlayerIdText.text.Replace("%d", "" + invitePlayer.playerId);
- Invoke(nameof(A__ClickClose), 10.0f);
- }
- public void A__ClickClose()
- {
- onClose.Invoke(invitePlayer);
- Destroy(gameObject);
- }
- public void A__CLickAccept()
- {
- onAccept.Invoke(this.invitePlayer);
- }
- }
|