using System; using UnityEngine; public class TestSetup : MonoBehaviour { void Awake() { // 初始化狗数据用于测试 DogProperty puppy = new DogProperty(); puppy.runSpeed = 1000; puppy.skin = "yellow"; UserProperty.dogs.Add(puppy); if (EnviromentSetting.languageData == null) { EnviromentController.InitialGameEnviroment(); } } // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { } // todo 删除。测试假数据注入 void TestDataInjection() { PlayerPrefs.SetString("LoginToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiSlRZTlpQOU8iLCJleHAiOjE3NDAxOTQ2Nzl9.081FF2AwxDTsN1gDWGZuzOxIDbM4M8Dw-mdwLfkxk4A"); DateTime now = DateTime.Now; DateTime oneHourAgo = now.AddHours(-1); PlayerPrefs.SetString("LoginTokenTime", oneHourAgo.ToString()); } // Update is called once per frame // void Update() // { // } }