Example #1
0
        protected override void Init()
        {
            base.Init();

            SetId(myGO.GetHashCode());

            _inputManager = new InputManager(new SampleBindings());
            _inputManager.AddActionToBindingKeyDown("shoot", FollowCursor);
            _inputManager.AddActionToBindingKeyUp("shoot", NotFollowCursor);
        }
Example #2
0
        protected override void Init()
        {
            base.Init();

            SetId(myGO.GetHashCode());

            #if (INPUT_MOBILE)
            inputSlider.InitBindings(new SampleBindings());
            _inputManager = inputSlider;
            _inputManager.AddActionToBindingKeyDown("shoot", StartControl);
            _inputManager.AddActionToBindingKeyUp("shoot", StopControl);
            #else
            _inputManager = new InputManager(new SampleBindings());
            _inputManager.AddActionToBindingKeyDown("shoot", StartControl);
            _inputManager.AddActionToBindingKeyUp("shoot", StopControl);
            #endif
        }