コード例 #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
ファイル: Spawn.cs プロジェクト: Speedy1780/BrickBreaker
    static void SpawnBricks(MenuCommand command)
    {
        SpawnBricks body = (SpawnBricks)command.context;

        body.PlaceBricks(false);
    }