zoukankan      html  css  js  c++  java
  • About Game Controllers

    About Game Controllers

      Game Controller(GC),框架从iOS 7和OS X v10.9开始加入,用于便捷使用控制器(手柄). Once discovered, your game reads control inputs as part of its normal gameplay. There are three kinds of controllers available:

    • A standard form-fitting controller: An iOS device sits inside the controller and the player can access both the iOS device’s screen and the controller elements.
    • An extended form-fitting controller: An iOS device sits inside the controller and the player can access both the iOS device’s screen and the controller elements.
    • An extended wireless controller: A controller that wirelessly connects to an iOS device or Mac.

      在使用GC的时候,须把GC设为可选,即游戏没有手柄,也要能玩。GC的主要类是GCController,通过以下2方法来管理无线手柄的同步:

      

      When designing your game, you can use one of the following strategies to read the profile’s input elements:

    • In your game loop, poll the values of the elements you are interested in. Reading an input directly works best for elements that need to be read every frame, such as directional pads. (每帧读取
    • Register a block to be called when values change. You can choose to register a block for a single element or for all of the elements in the profile. Callbacks work best when you need to guarantee that a change is always detected. (设置回调读取
    • Periodically save a snapshot of the controller state. All of the controls are read simultaneously. Then, at a later point in the game, the controller data is processed.(保存完整profile数据,之后读取

     

  • 相关阅读:
    DJango简单的后台定义登录验证
    简单聊聊HTTP/TCP/IP协议
    简单的线程说明
    设计模式 -- 常用设计模式
    网络知识 -- 第二部
    c#利用脚本,本地执行linux命令
    Json和类之间的转化
    关于地址映射穿透和套接字复用的说明
    多线程调用中的注意事项
    Task多线程的常规用法
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3666525.html
Copyright © 2011-2022 走看看