示例#1
0
 void InstanceSceneManager()
 {
     if (instance != null)
     {
         DestroyImmediate(this);
     }
     else
     {
         instance = this;
     }
 }
    // UNITY HOOKS

    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }
        var mazeGen = new MazeGeneratorService();

        this.mazeModel = mazeGen.GenerateMaze(11, 11);
    }