protected void Start()
 {
     audioSource = GetComponent <AudioSource>();
     if (!GMManager.GAME_INITED)
     {
         GMManager.Init();
     }
     ReadHeartFromFile("game");
     if (debugStart)
     {
         OnDebugStart();
     }
     else
     {
         OnCommonStart();
     }
 }
Esempio n. 2
0
    void Awake()
    {
        GMManager.Init();//全局初始化
        startChooses = new List <StartChoose>();

        startChooses.Add(new StartChoose(startText));
        FileStream fs = new FileStream("game.save", FileMode.OpenOrCreate);

        if (fs.Length == 0)
        {
            startChooses.Add(new StartChoose(loadText, false));
        }
        else
        {
            startChooses.Add(new StartChoose(loadText));
        }
        startChooses.Add(new StartChoose(quitText));

        cursor.transform.position = startChooses[currentChoosePoint].text.transform.position - new Vector3(150, 0, 0);
        startChooses[currentChoosePoint].text.fontStyle = FontStyle.Bold;

        InvokeRepeating("RandomWaterWave", 3, 3);
    }
Esempio n. 3
0
 // Start is called before the first frame update
 void Start()
 {
     GMManager.Init();
 }