驱蚊app
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 

28 řádky
607 B

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class GameData : MonoBehaviour
  5. {
  6. public static GameData Instance { get; private set; }
  7. //public string username = "游客";
  8. public string appleUserId = "123";
  9. /// <summary>
  10. /// 是否是游客
  11. /// </summary>
  12. public bool isYouke;
  13. private void Awake()
  14. {
  15. // 确保全局唯一
  16. if (Instance != null && Instance != this)
  17. {
  18. Destroy(gameObject);
  19. return;
  20. }
  21. Instance = this;
  22. DontDestroyOnLoad(gameObject); // 场景切换不销毁
  23. }
  24. }