示例#1
0
        private void Start()
        {
            lives              = availableLives;
            ballManager        = HawkBallsManager.Instance;
            brickManager       = HawkBrickManager.Instance;
            collectableManager = HawkCollectableManager.Instance;

            Screen.SetResolution(540, 900, false);
            HawkBall.onDeath             += onDeath;
            HawkBrick.onBrickDestruction += brickDestruction;
        }
 private void Awake()
 {
     if (Instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
示例#3
0
        private void Start()
        {
            // Get a reference to the levels
            HawkGameManger manger = HawkGameManger.Instance;

            collectableManager = HawkCollectableManager.Instance;

            // event subscription
            HawkBrick.onBrickDestruction += onBrickDestruction;
            levels       = manger.levels;
            maxRows      = manger.maxRows;
            maxCols      = manger.maxCols;
            currentLevel = manger.currentLevel;

            bricksContainer = new GameObject("bricksContainer");
            makeBricks();
        }