Squashed commit of the following:
commit1e4ffae4f6Author: bance <90307762+bance23@users.noreply.github.com> Date: Sat May 13 14:23:47 2023 +0200 proba athozas veszelyes commit0297a2cb78Merge:604088e31b9214Author: bance <90307762+bance23@users.noreply.github.com> Date: Sat May 13 14:09:48 2023 +0200 Merge branch 'master' of https://github.com/playmaker1210/PuzzleColorBall commit31b9214f35Merge:184d2e889976bbAuthor: Playmaker1210 <hatvanitamas09@gmail.com> Date: Mon May 8 14:42:34 2023 +0200 Merge https://github.com/playmaker1210/PuzzleColorBall commit184d2e84daAuthor: Playmaker1210 <hatvanitamas09@gmail.com> Date: Mon May 8 14:41:59 2023 +0200 server mukodik commit89976bbcf8Author: playmaker1210 <75033623+playmaker1210@users.noreply.github.com> Date: Fri May 5 12:49:28 2023 +0200 Update README.md commit250cc0ffeeAuthor: playmaker1210 <75033623+playmaker1210@users.noreply.github.com> Date: Fri May 5 12:49:01 2023 +0200 Create README.md commit2f0ae77e35Author: playmaker1210 <hatvanitamas09@gmail.com> Date: Thu May 4 12:56:56 2023 +0200 update commitb94c80b293Author: Playmaker1210 <hatvanitamas09@gmail.com> Date: Tue May 2 13:46:38 2023 +0200 coin db working commit25d792e0fdAuthor: playmaker1210 <hatvanitamas09@gmail.com> Date: Sat Apr 29 17:07:23 2023 +0200 update
This commit is contained in:
@@ -19,11 +19,13 @@ public class UsernameHandler : MonoBehaviour
|
||||
private StreamReader reader;
|
||||
private DatabaseData db;
|
||||
private PlayerList playerList;
|
||||
private CoinCounter cc;
|
||||
|
||||
private void Awake() {
|
||||
input.gameObject.SetActive(false);
|
||||
inputBackground.SetActive(false);
|
||||
path = Application.persistentDataPath + "/username.txt";
|
||||
cc = FindObjectOfType<CoinCounter>();
|
||||
db = FindObjectOfType<DatabaseData>();
|
||||
db.GetPlayerData();
|
||||
}
|
||||
@@ -54,6 +56,8 @@ public class UsernameHandler : MonoBehaviour
|
||||
userid = item.player_id;
|
||||
}
|
||||
}
|
||||
|
||||
db.GetCoinDataCall(userid);
|
||||
}
|
||||
|
||||
private void usernameCheck(){
|
||||
@@ -85,7 +89,11 @@ public class UsernameHandler : MonoBehaviour
|
||||
username = data;
|
||||
Debug.Log("username: " + username);
|
||||
|
||||
getId();
|
||||
getId();
|
||||
|
||||
//StartCoroutine(waitForCoins());
|
||||
|
||||
|
||||
|
||||
input.gameObject.SetActive(false);
|
||||
inputBackground.SetActive(false);
|
||||
@@ -93,4 +101,11 @@ public class UsernameHandler : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator waitForCoins(){
|
||||
yield return new WaitUntil(() => db.coins != 0);
|
||||
|
||||
cc.SetCoin(db.GetCoins(userid));
|
||||
Debug.Log("uh coin"+cc.coin);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user