private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } bSink = GetComponent <BallSink>(); boardManager = GetComponent <BoardManager>(); bSpawn = GetComponent <BallSpawner>(); //Call the InitGame function to initialize the first level //InitGame(); }
// Use this for initialization /*void Start () { * * }*/ // Update is called once per frame /*void Update () { * * }*/ //Initializes it with the ballSink it needs to work public void init(LevelManager lvM, BallSink bs) { _lvMgr = lvM; _bSink = bs; }
// Use this for initialization /*void Start () { * * }*/ // Update is called once per frame /*void Update () { * * }*/ //Initializes it with the ballSink it needs to work public void Init(BallSink bs) { _bSink = bs; }