Пример #1
0
 protected override void Start()
 {
     _scorekeeper = ScoreManager.GetComponent <ScoreDisplayController>();
     GameManager.Instance.EventBus.Subscribe <BallGridMatchArgs>(OnMatchFound);
     GameManager.Instance.EventBus.Subscribe <OrphanedBallsEventArgs>(OnOrphansFound);
     GameManager.Instance.EventBus.Subscribe <BallFiredEventArgs>(OnBallFired);
 }
    // Use this for initialization
    void Awake()
    {
        spriteController       = Utilities.GetChildScript <SpriteController>(this.gameObject, "SpriteControllerGO");
        scoreDisplayController = Utilities.GetChildScript <ScoreDisplayController>(this.transform.Find("Canvas").gameObject, "ScoreDisplayControllerGO");
        tileInHandController   = Utilities.GetChildScript <TileInHandController>(this.transform.Find("Canvas").gameObject, "TileInHandControllerGO");

        if (spriteController == null || scoreDisplayController == null || tileInHandController == null)
        {
            Debug.LogError("Controller not found!");
        }
    }