Пример #1
0
    // Use this for initialization
    void Start()
    {
        isRunning = false;

        menu        = GameObject.Find("Canvas/StartMenu").GetComponent <MenuView>();
        scorePanel  = GameObject.Find("Canvas/ScorePanel").GetComponent <ScoreView>();
        gameSummary = GameObject.Find("Canvas/GameSummary").GetComponent <GameSummaryView>();

        bird                 = Camera.main.transform.Find("Bird").GetComponent <BirdController>();
        obstacleManager      = GameObject.Find("ObstacleManager").GetComponent <ObstacleManager>();
        backgroundController = GameObject.Find("Background").GetComponent <BackgroundController>();

        menu.Activate();
    }
Пример #2
0
        protected override void Load(Sequence createLoadingSequence)
        {
            createLoadingSequence.AddSequence((next) =>
            {
                _canvas = GetComponentInChildren <Canvas>().gameObject.GetComponent <RectTransform>();

                _model = new MenuModel();
                _model.SetPoint(_progressController.SavedNumber);
                _view = _prefabController.GetUIObject <MenuView>(PrefabConstant.PathMenuView, _canvas);
                _view.Init(StartPlayerVsPlayer);
                _view.Set(_model);
                _view.Activate();

                next();
            });
        }
Пример #3
0
 public void OnBackToMenuButtonPressed()
 {
     gameSummary.Deactivate();
     menu.Activate();
 }