PKGameReadyView.cs 657 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class PKGameReadyView : MonoBehaviour
  6. {
  7. PKGameMode pKGameMode;
  8. void Start()
  9. {
  10. pKGameMode = (PKGameMode) GameMgr.ins.gameMode;
  11. (Sprite avatar, string nickName) = RoleMgr.GetRoleInfo(PKGameMode.playerRoleIDs[pKGameMode.currentPlayerID - 1]);
  12. this.transform.Find("Avatar/Sprite").GetComponent<Image>().sprite = avatar;
  13. this.transform.Find("Name").GetComponent<Text>().text = nickName;
  14. }
  15. public void Continue()
  16. {
  17. Destroy(this.gameObject);
  18. pKGameMode.UnbanBowReady();
  19. }
  20. }