Пример #1
0
    private void Awake()
    {
        mainController = GameObject.FindWithTag(Tags.MainController).GetComponent <MainController>();

        pipePassedEventChannel = GetComponent <PipePassedEventChannel>();
        birdDeathEventChannel  = GetComponent <BirdDeathEventChannel>();
    }
Пример #2
0
    private void Awake()
    {
        birdPhysics     = transform.root.GetComponentInChildren <BirdPhysics>();
        collisionSensor = transform.root.GetComponentInChildren <CollisionSensor>();
        gameController  = GameObject.FindWithTag(Tags.GameController).GetComponent <GameController>();

        birdDeathEventChannel = GameObject.FindWithTag(Tags.GameController).GetComponent <BirdDeathEventChannel>();
    }
Пример #3
0
 private void Awake()
 {
     mainController         = GameObject.Find("MainController").GetComponent <MainController>();
     pipePassedEventChannel = GetComponent <PipePassedEventChannel>();
     birdDeathEventChannel  = GetComponent <BirdDeathEventChannel>();
     Canvas[] canvas = GameObject.Find("Display").GetComponentsInChildren <Canvas>();
     mainMenuCanvas      = canvas[1];
     headUpDisplayCanvas = canvas[2];
     deathScreenCanvas   = canvas[3];
 }