Пример #1
0
 void Awake()
 {
     levelUI.text += level;
     brickSpawner  = GetComponent <SpawnBricks>();
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     //Ensureds this gameObject is not destropyed when loading a scene
     DontDestroyOnLoad(gameObject);
     brickSpawner.LoadLevel(level, start);
 }
Пример #2
0
    static void SpawnBricks(MenuCommand command)
    {
        SpawnBricks body = (SpawnBricks)command.context;

        body.PlaceBricks(false);
    }