Exemple #1
0
        public void Initialize(IEndGameService endGameService)
        {
            Alkar.InjectMonoBehaviour(this);

            _disposable.Add(
                endGameService
                .EndGameWithMessage
                .Subscribe(x => _text.text = x)
                );
        }
        protected override IDisposable[] Init()
        {
            Alkar.InjectMonoBehaviour(this);

            _handler = new BallHandler(_ballKind);
            _jumpDirectionProvider = new JumpDirectionProvider();

            return(new IDisposable[]
            {
                _handler.JumpForce.Subscribe(Jump),
                _handler.RotationTorque.Subscribe(Rotate),
                _handler.ScaleAnimation.Subscribe(ScaleAnimation)
            });
        }
 private void Awake()
 {
     Alkar.InjectMonoBehaviour(this);
 }