本文整理了Java中com.badlogic.gdx.graphics.g2d.Animation.setKeyFrames()
方法的一些代码示例,展示了Animation.setKeyFrames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation.setKeyFrames()
方法的具体详情如下:
包路径:com.badlogic.gdx.graphics.g2d.Animation
类名称:Animation
方法名:setKeyFrames
暂无
代码示例来源:origin: libgdx/libgdx
/** Constructor, storing the frame duration and key frames.
*
* @param frameDuration the time between frames in seconds.
* @param keyFrames the objects representing the frames. */
public Animation (float frameDuration, T... keyFrames) {
this.frameDuration = frameDuration;
setKeyFrames(keyFrames);
}
代码示例来源:origin: libgdx/libgdx
/** Constructor, storing the frame duration and key frames.
*
* @param frameDuration the time between frames in seconds.
* @param keyFrames the objects representing the frames. */
public Animation (float frameDuration, T... keyFrames) {
this.frameDuration = frameDuration;
setKeyFrames(keyFrames);
}
代码示例来源:origin: libgdx/libgdx
/** Constructor, storing the frame duration and key frames.
*
* @param frameDuration the time between frames in seconds.
* @param keyFrames the objects representing the frames. If this Array is type-aware, {@link #getKeyFrames()} can return the
* correct type of array. Otherwise, it returns an Object[]. */
public Animation (float frameDuration, Array<? extends T> keyFrames) {
this.frameDuration = frameDuration;
Class arrayType = keyFrames.items.getClass().getComponentType();
T[] frames = (T[])ArrayReflection.newInstance(arrayType, keyFrames.size);
for (int i = 0, n = keyFrames.size; i < n; i++) {
frames[i] = keyFrames.get(i);
}
setKeyFrames(frames);
}
代码示例来源:origin: libgdx/libgdx
/** Constructor, storing the frame duration and key frames.
*
* @param frameDuration the time between frames in seconds.
* @param keyFrames the objects representing the frames. If this Array is type-aware, {@link #getKeyFrames()} can return the
* correct type of array. Otherwise, it returns an Object[]. */
public Animation (float frameDuration, Array<? extends T> keyFrames) {
this.frameDuration = frameDuration;
Class arrayType = keyFrames.items.getClass().getComponentType();
T[] frames = (T[])ArrayReflection.newInstance(arrayType, keyFrames.size);
for (int i = 0, n = keyFrames.size; i < n; i++) {
frames[i] = keyFrames.get(i);
}
setKeyFrames(frames);
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** Constructor, storing the frame duration and key frames.
*
* @param frameDuration the time between frames in seconds.
* @param keyFrames the objects representing the frames. */
public Animation (float frameDuration, T... keyFrames) {
this.frameDuration = frameDuration;
setKeyFrames(keyFrames);
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** Constructor, storing the frame duration and key frames.
*
* @param frameDuration the time between frames in seconds.
* @param keyFrames the objects representing the frames. If this Array is type-aware, {@link #getKeyFrames()} can return the
* correct type of array. Otherwise, it returns an Object[]. */
public Animation (float frameDuration, Array<? extends T> keyFrames) {
this.frameDuration = frameDuration;
Class arrayType = keyFrames.items.getClass().getComponentType();
T[] frames = (T[])ArrayReflection.newInstance(arrayType, keyFrames.size);
for (int i = 0, n = keyFrames.size; i < n; i++) {
frames[i] = keyFrames.get(i);
}
setKeyFrames(frames);
}
内容来源于网络,如有侵权,请联系作者删除!