コード例 #1
0
		public KeyboardMovement(ICharacter character, IInput input, KeyboardMovementMode mode)
		{
			_character = character;
			Enabled = true;
			Mode = mode;
			_up = new AGSConcurrentHashSet<Key> ();
			_down = new AGSConcurrentHashSet<Key> ();
			_left = new AGSConcurrentHashSet<Key> ();
			_right = new AGSConcurrentHashSet<Key> ();
			_keysDown = new AGSConcurrentHashSet<Key> ();

			input.KeyDown.SubscribeToAsync(onKeyDown);
			input.KeyUp.SubscribeToAsync(onKeyUp);
		}
コード例 #2
0
ファイル: KeyboardMovement.cs プロジェクト: saizant/MonoAGS
        public KeyboardMovement(ICharacter character, IInput input, IFocusedUI focusedUi, KeyboardMovementMode mode)
        {
            _character = character;
            _focusedUi = focusedUi;
            Enabled    = true;
            Mode       = mode;
            _up        = new AGSConcurrentHashSet <Key> ();
            _down      = new AGSConcurrentHashSet <Key> ();
            _left      = new AGSConcurrentHashSet <Key> ();
            _right     = new AGSConcurrentHashSet <Key> ();
            _keysDown  = new AGSConcurrentHashSet <Key> ();

            input.KeyDown.SubscribeToAsync(onKeyDown);
            input.KeyUp.SubscribeToAsync(onKeyUp);
        }