当前位置: 首页>>代码示例>>C#>>正文


C# IInput类代码示例

本文整理汇总了C#中IInput的典型用法代码示例。如果您正苦于以下问题:C# IInput类的具体用法?C# IInput怎么用?C# IInput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IInput类属于命名空间,在下文中一共展示了IInput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CPlayer

        public CPlayer(IGameObjectManager pObjMan, IEngineCore pEngineCore)
            : base(pObjMan, pEngineCore)
        {
            _fVelocity = 0f;
            uiShotPause = 15;

            ObjType = EGameObjectType.GotPlayer;

            _stPos = new TPoint2(Res.GameVpWidth / 2f, Res.GameVpHeight / 2f);
            _fSize = 150f;
            _fColScale = 0.6f;

            dimPl = new TPoint3(_fSize, _fSize, _fSize);

            IResourceManager pResMan;
            IEngineSubSystem pSubSys;

            pEngineCore.GetSubSystem(E_ENGINE_SUB_SYSTEM.ESS_INPUT, out pSubSys);
            pInput = (IInput)pSubSys;

            pEngineCore.GetSubSystem(E_ENGINE_SUB_SYSTEM.ESS_RESOURCE_MANAGER, out pSubSys);
            pResMan = (IResourceManager)pSubSys;

            IEngineBaseObject pBaseObj;
            pResMan.GetResourceByName(Res.MeshShip, out pBaseObj);
            pMesh = (IMesh)pBaseObj;
            pResMan.GetResourceByName(Res.TexShip, out pBaseObj);
            pTex = (ITexture)pBaseObj;
            pResMan.GetResourceByName(Res.TexSpark, out pBaseObj);
            pTexSpark = (ITexture)pBaseObj;
        }
开发者ID:whztt07,项目名称:DGLE,代码行数:31,代码来源:CPlayer.cs

示例2: Console

        public Console(IInput input, IViewer viewer)
        {
            Command = new Command();
            _Filter = LogFilter.All;

            _Initial(input , viewer);
        }
开发者ID:kof1016,项目名称:Regulus,代码行数:7,代码来源:utility_console.cs

示例3: TaskPresenter

 public TaskPresenter(ITaskRepo taskRepo, IInput input, IPrompt prompt, IFileHistoryRepo fileHistoryRepo)
 {
     _taskRepo = taskRepo;
     _input = input;
     _prompt = prompt;
     _fileHistoryRepo = fileHistoryRepo;
 }
开发者ID:fernandozamoraj,项目名称:WindowsToDo,代码行数:7,代码来源:TaskPresenter.cs

示例4: GrammerRuleHandler

 public GrammerRuleHandler(IInput input)
 {
     this.input = input;
     this.identifierMap = new Dictionary<string, object>();
     ContextProvider.GetContext().SetContexts(identifierMap);
     functionsIdentified = 0;
 }
开发者ID:kamatanay,项目名称:MayaLanguage,代码行数:7,代码来源:GrammerRuleHandler.cs

示例5: Console

 public Console(IInput input, IViewer viewer)
 {
     Command = new Command();
     _Filter = LogFilter.All;
     _Commands = new Dictionary<string, string>();
     _Initial(input, viewer);
 }
开发者ID:jiowchern,项目名称:Regulus,代码行数:7,代码来源:Console.cs

示例6: Execute

        /// <summary>
        /// Executes the specified command for the specified connection.
        /// </summary>
        /// <param name="input">The IInput containing the command information to execute.</param>
        /// <param name="connection">The IConnection executing the command.</param>
        public void Execute(IInput input, IConnection connection)
        {
            // Find the command from the input.
            var cmd = FindCommandInternal(input.CommandName);
            if (cmd == null)
            {
                InvalidateResponse(input, connection, CommonResources.CommandInvalidFormat, input.CommandName);
                return;
            }

            string errorMessage;
            if (!cmd.Value.ValidateArguments(input, out errorMessage))
            {
                InvalidateResponse(input, connection, errorMessage);
                return;
            }

            if (cmd.Value.RequiresUser && connection.User == null)
            {
                InvalidateResponse(input, connection, CommonResources.CommandRequiresUser);
                return;
            }

            if (cmd.Value.RequiresCharacter && connection.Character == null)
            {
                InvalidateResponse(input, connection, CommonResources.CommandRequiresCharacter);
                return;
            }

            var response = cmd.Value.Execute(input, connection);
            connection.Write(response);
        }
开发者ID:mobytoby,项目名称:beastmud,代码行数:37,代码来源:CommandManager.cs

示例7: AGSSliderComponent

		public AGSSliderComponent(IGameState state, IInput input, IGameEvents gameEvents)
		{
			_state = state;
			_input = input;
			_gameEvents = gameEvents;
			OnValueChanged = new AGSEvent<SliderValueEventArgs> ();
		}
开发者ID:tzachshabtay,项目名称:MonoAGS,代码行数:7,代码来源:AGSSliderComponent.cs

示例8: Flush

 private void Flush(IInput input)
 {
     if (input != null)
     {
         input.Flush();
     }
 }
开发者ID:gmich,项目名称:GuiSystem,代码行数:7,代码来源:InputManager.cs

示例9: AddInputChannel

        // ------------ Input Channels ------------
        public void AddInputChannel(IInput input)
        {
            if (InputChannels.Contains(input))
                return;

            InputChannels.Add(input);
        }
开发者ID:ValdemarOrn,项目名称:KickBrain,代码行数:8,代码来源:SourceManager.cs

示例10: AGSDraggableComponent

 public AGSDraggableComponent(IInput input, IGameEvents gameEvents)
 {
     _input = input;
     _gameEvents = gameEvents;
     _gameEvents.OnRepeatedlyExecute.Subscribe(onRepeatedlyExecute);
     IsDragEnabled = true;
 }
开发者ID:tzachshabtay,项目名称:MonoAGS,代码行数:7,代码来源:AGSDraggableComponent.cs

示例11: Algorithm

        /// <summary>
        /// Constructor (throws ArgumentException on invalid input)
        /// </summary>
        /// <param name="input">input object</param>
        /// <param name="caseSensitive">flag whether find matches with case sensitive or not (default to case insensitive)</param>
        public Algorithm(IInput input, IOverlapCalculator Table, bool caseSensitive = false)
        {
            try
            {
                if (input == null)
                {
                    throw new ArgumentNullException(Errors.InputWasNull);
                }

                if (!input.IsValid)
                {
                    throw new ArgumentException(Errors.InputWasInvalid);
                }

                if (Table == null)
                {
                    throw new ArgumentNullException(Errors.OvelapCalculatorWasNull);
                }

                this.Text = input.Text;
                this.SubText = input.SubText;
                this.PrefixTable = Table.Compute();
                this.IsCaseSensitive = caseSensitive;
            }
            catch (Exception e)
            {
                Logger.Push("Error received while initializing the KMPAlgorithm class object : " + e.Message);
                throw;
            }
        }
开发者ID:alonfai,项目名称:sampleCode,代码行数:35,代码来源:Algorithm.cs

示例12: Cpu

        public Cpu(IMemory memory, IInput input, IOutput output)
        {
            _memory = memory;
            In = input;
            Out = output;
            Registers = new byte[16];

            Commands = new Dictionary<byte, Command>
            {
                {0x01, new IncCommand(this)},
                {0x02, new DecCommand(this)},
                {0x03, new MovCommand(this)},
                {0x04, new MovcCommand(this)},
                {0x05, new LslCommand(this)},
                {0x06, new LsrCommand(this)},
                {0x07, new JmpCommand(this)},
                {0x0A, new JfeCommand(this)},
                {0x0B, new RetCommand(this)},
                {0x0C, new AddCommand(this)},
                {0x0D, new SubCommand(this)},
                {0x0E, new XorCommand(this)},
                {0x0F, new OrCommand(this)},
                {0x10, new InCommand(this)},
                {0x11, new OutCommand(this)}
            };
        }
开发者ID:ramunsk,项目名称:SimpleVM,代码行数:26,代码来源:Cpu.cs

示例13: DebugStateUpdate

 /// <summary>
 /// DebugState update event
 /// </summary>
 /// <param name="input">Input</param>
 /// <param name="deltaTime">Time since the last update</param>
 private static void DebugStateUpdate(IInput input, float deltaTime)
 {
     if (input[Gamepad.Instance.Quit])
     {
         GameEngine.Instance.Quit();
     }
 }
开发者ID:jeffbernard,项目名称:fcbrd,代码行数:12,代码来源:Game.cs

示例14: CreateFakeInput

 private static IInputObservable CreateFakeInput(IInput[] inputEvents)
 {
     var input = A.Fake<IInputObservable>();
     var inputObs = Observable.Interval(TimeSpan.FromSeconds(0.1)).Take(inputEvents.Length).Select(i => inputEvents[i]); // spaces out the input by 1/10 of a second
     A.CallTo(() => input.InputEvents).Returns(inputObs);
     return input;
 }
开发者ID:domisterwoozy,项目名称:LabBox,代码行数:7,代码来源:InputTests.cs

示例15: Update

 public override void Update(GameTime gameTime, IInput input)
 {
     if (input != null)
     {
         if (input.IsKeyDown(Keys.Left) && direction != Direction.Right)
         {
             Direction = Direction.Left;
             return;
         }
         if (input.IsKeyDown(Keys.Right) && direction != Direction.Left)
         {
             Direction = Direction.Right;
             return;
         }
         if (input.IsKeyDown(Keys.Up) && direction != Direction.Bottom)
         {
             Direction = Direction.Top;
             return;
         }
         if (input.IsKeyDown(Keys.Down) && direction != Direction.Top)
         {
             Direction = Direction.Bottom;
             return;
         }
     }
 }
开发者ID:K0bin,项目名称:Snake,代码行数:26,代码来源:SnakeHead.cs


注:本文中的IInput类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。