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数据,之后读取

     

  • 相关阅读:
    hibernate.cfg.xml
    java util 巧用
    Ant
    WEB文件上传二 (Struts 文件上传)
    web文件上传一学习记录 (简单的web浏览器可读文件的上传,servlet 文件上传)
    long类型的时间转为n秒前n分钟前n小时前或者日期
    各种String类型的时间转long型,long转String
    Android 内容提供者(ContentProvider)的简单实用
    sql性能优化总结(转)
    数据添加到DataTable
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3666525.html
Copyright © 2011-2022 走看看