驱蚊app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 line
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. }