| | |
| | | |
| | | private RectTransform rt; |
| | | |
| | | //public TextMeshProUGUI rankUpbj; |
| | | |
| | | //bool isSelfPlayer; |
| | | |
| | | /// <summary> |
| | | /// Start is called on the frame when a script is enabled just before |
| | | /// any of the Update methods is called the first time. |
| | |
| | | |
| | | if (data.httpInfo.username.Equals(GameConfig.Imei)) |
| | | { |
| | | //isSelfPlayer = true; |
| | | //是自己 |
| | | if (backGround.sprite != tmpBackGround) |
| | | backGround.sprite = tmpBackGround; |
| | |
| | | } |
| | | else |
| | | { |
| | | //isSelfPlayer = false; |
| | | |
| | | if (backGround.sprite != otherBackGround) |
| | | backGround.sprite = otherBackGround; |
| | | if (playerNameTxt.color != otherColor) |
| | |
| | | } |
| | | } |
| | | |
| | | // /// <summary> |
| | | // /// 检查排名上升 |
| | | // /// </summary> |
| | | // /// <param name="rankUp"></param> |
| | | // public void CheckRank(int rankUp) |
| | | // { |
| | | // if (rankUp > 0) |
| | | // { |
| | | // Debug.Log($"排名上升:{rankUp} isSelfPlayer:{isSelfPlayer} rankUpbj.gameObject.activeSelf:{rankUpbj.gameObject.activeSelf}"); |
| | | // if (isSelfPlayer && !rankUpbj.gameObject.activeSelf) |
| | | // { |
| | | // rankUpbj.gameObject.SetActive(true); |
| | | // rankUpbj.text = rankUp.ToString(); |
| | | // } |
| | | // } |
| | | // else if (rankUpbj.gameObject.activeSelf) |
| | | // { |
| | | // rankUpbj.gameObject.SetActive(false); |
| | | // } |
| | | // } |
| | | |
| | | public void SetPos() |
| | | { |
| | | backGround.rectTransform.anchoredPosition = new UnityEngine.Vector2(720, 0); |
| | | backGround.rectTransform.anchoredPosition = new UnityEngine.Vector2(-796, 0); |
| | | } |
| | | |
| | | public void PlayDoTween(float duration) |