示例#1
0
        public void OnInjected()
        {
            SwipeController.SwipeEvent.AddListener(OnSwipe);

            var gameObejct = new GameObject();

            _physicsController = gameObejct.AddComponent <PhysicsController>();
            DiContainer.BuildUp(_physicsController);

            _physicsController.BallOutBot.AddListener(OnBallOut);
            _physicsController.BallOutTop.AddListener(OnBallOut);

            _physicsController.LaunchBall();

            MenuMediator.gameObject.SetActive(false);
        }
示例#2
0
        private void OnHost()
        {
            isHost = true;

            SwipeController.SwipeEvent.AddListener(OnSwipe);
            MonoProvider.FixedUpdateEvent.AddListener(OnUpdate);

            var gameObejct = new GameObject();

            _physicsController = gameObejct.AddComponent <PhysicsController>();
            DiContainer.BuildUp(_physicsController);

            _physicsController.BallOutBot.AddListener(OnBallOut);
            _physicsController.BallOutTop.AddListener(OnBallOut);

            _physicsController.LaunchBall();

            MenuMediator.gameObject.SetActive(false);
        }