Ejemplo n.º 1
0
        private void InstantiateGame()
        {
            DisposeSubscriptions();
            var go            = Instantiate(GameScreenPrefab);
            var rectTransform = go.GetComponent <RectTransform>();

            rectTransform.SetParent(GameContainer);
            rectTransform.ScaleOne();
            rectTransform.Stretch();
            gameView = go.GetComponent <GameView>();
            GameProvider.SetGameView(gameView);
            ScrollingBackground.StartMovement();
            gameView.Init();
            disposables = new CompositeDisposable(SubscribeToGameOver(), SubscribeToLevelWon(), SubscribeToTryAgain());
        }