コード例 #1
0
  public void setup() {
    CCVectorFont myFont = CCFontIO.createVectorFont("arial", 24, CCCharSet.EXTENDED_CHARSET);

    String myText = "CCCatch";
    _myTextWidth = myFont.width(myText);

    System.out.println(_myTextWidth);

    _myText = new CCText(myFont);
    _myText.text(myText);

    addControls("app", "app", this);
  }
コード例 #2
0
  @Override
  public void setup() {
    addControls("app", "app", this);

    _myTargetBuffer = new CCValueBuffer<Float>(height);
    _myPositionBuffer = new CCValueBuffer<Float>(height);
    _myVelocityBuffer = new CCValueBuffer<Float>(height);
    _myAccelerationBuffer = new CCValueBuffer<Float>(height);
    _myFuturePositionBuffer = new CCValueBuffer<Float>(height);

    _myLimiter = new CCMotionLimiter();
    addControls("app", "limiter", _myLimiter);
    frameRate(60);

    g.textFont(CCFontIO.createTextureMapFont("arial", 12));
  }