void Start() { UserMenu user = new UserMenu(); GameInformation gameinfo = user.GetInfo(userId); Debug.Log(userId); MoneyText.text = gameinfo.Money + ""; PlayerHpText.text = gameinfo.PlayerHp + ""; PlayerSpeedText.text = gameinfo.PlayerSpeed + ""; PlayerArmorText.text = gameinfo.PlayerArmor + ""; FortressHpText.text = gameinfo.FortressHp + ""; }
void Update() { if (_mNeedMove) { UserMenu user = new UserMenu(); GameInformation gameinfo = user.GetInfo(userId); MoneyText.text = gameinfo.Money + ""; PlayerHpText.text = gameinfo.PlayerHp + ""; PlayerSpeedText.text = gameinfo.PlayerSpeed + ""; PlayerArmorText.text = gameinfo.PlayerArmor + ""; FortressHpText.text = gameinfo.FortressHp + ""; _mNeedMove = false; return; } }