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); }
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); }