using Newtonsoft.Json.Linq; using System; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; public class BJBase : MonoBehaviour { public TextMeshProUGUI tMP_CoinCount; public GameObject gold; public GameObject silver; public Vector3 endPoint; public bool isBoss; public bool isLocalCoin; // 是否本地玩家的金币(金/银区分用) public Action JiaFen; public long coinCount; public string userID; public int sitID; public object obj; public Vector3 startPoint; public void Init(long coin,Vector3 endPoint, string userID="", int sitID=999, object jobj=null) { coinCount = coin; this.userID = userID; this.sitID = sitID; this.endPoint = endPoint; this.obj = jobj; } public virtual void SetCoinCount() { } public static string NumAdd(string num) { string str = $""; int a = num.Length; bool isDouHao = false; if (a >= 4) { //""; a -= 3; isDouHao = true; } for (int i = 0; i < num.Length; i++) { if (isDouHao) { if (i == a) { str += ""; } } str += $""; } return str; } }