RoleMgr.cs 593 B

123456789101112131415161718
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /* 内置角色信息管理者,(PK模式用到的角色选择) */
  5. public class RoleMgr : MonoBehaviour
  6. {
  7. static string[] roleNames = {"海绵宝宝", "方狗狗", "五六七", "CHANEL", "Mimi", "喵了个咪"};
  8. public static int roleCount {
  9. get {
  10. return roleNames.Length;
  11. }
  12. }
  13. public static (Sprite, string) GetRoleInfo(int id)
  14. {
  15. Sprite sprite = Resources.Load<Sprite>("Textures/Avatar/Player" + id);
  16. return (sprite, roleNames[id - 1]);
  17. }
  18. }