text stringlengths 3 1.18M |
|---|
package org.cocos2d.actions.interval;
import org.cocos2d.actions.CCProgressTimer;
import org.cocos2d.nodes.CCNode;
/**
Progress from a percentage to another percentage
@since v0.99.1
*/
public class CCProgressFromTo extends CCIntervalAction {
float to_;
float from_;
/** Creates and initializes the action wi... |
package org.cocos2d.actions.interval;
import org.cocos2d.protocols.CCRGBAProtocol;
/** Fades Out an object that implements the CCRGBAProtocol protocol.
* It modifies the opacity from 255 to 0.
* The "reverse" of this action is FadeIn
*/
public class CCFadeOut extends CCIntervalAction {
public static CCFadeOut ... |
package org.cocos2d.actions.interval;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.CGPoint;
/** Moves a CCNode object x,y pixels by modifying it's position attribute.
x and y are relative to the position of the object.
Duration is is seconds.
*/
public class CCMoveBy extends CCMoveTo {
/** create... |
package org.cocos2d.actions.interval;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.CGPoint;
//
// JumpTo
//
/**
* Moves a CCNode object to a parabolic position simulating a jump movement
* by modifying it's position attribute.
*/
public class CCJumpTo extends CCJumpBy {
public static ... |
package org.cocos2d.actions.interval;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.protocols.CCRGBAProtocol;
/** Fades an object that implements the CCRGBAProtocol protocol.
* It modifies the opacity from the current value to a custom one.
* @warning This action doesn't support "reverse"
*/
public class CCF... |
package org.cocos2d.actions.interval;
import org.cocos2d.nodes.CCNode;
public class CCSkewBy extends CCSkewTo {
private float skewX;
private float skewY;
public static CCSkewBy action(float t, float dx, float dy) {
return new CCSkewBy(t, dx, dy);
}
protected CCSkewBy(float t, float dx, float dy) {
super(... |
package org.cocos2d.actions.interval;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.CGPoint;
/**
* Moves a CCNode object simulating a parabolic jump movement by modifying it's position attribute.
*/
public class CCJumpBy extends CCIntervalAction {
protected CGPoint startPosition;
protected CGPoin... |
package org.cocos2d.actions.interval;
/**
* Delays the action a certain amount of seconds
*/
public class CCDelayTime extends CCIntervalAction {
public static CCDelayTime action(float t) {
return new CCDelayTime(t);
}
protected CCDelayTime(float t) {
super(t);
}
@Override
public ... |
package org.cocos2d.actions.instant;
import org.cocos2d.nodes.CCNode;
/**
* Toggles the visibility of a node
*/
public class CCToggleVisibility extends CCInstantAction {
public static CCToggleVisibility action() {
return new CCToggleVisibility();
}
@Override
public CCToggleVisibility copy() {
... |
package org.cocos2d.actions.instant;
import org.cocos2d.actions.base.CCFiniteTimeAction;
/** Instant actions are immediate actions. They don't have a duration like
the CCIntervalAction actions.
*/
public class CCInstantAction extends CCFiniteTimeAction {
protected CCInstantAction() {
super(0);
}
... |
package org.cocos2d.actions.instant;
import org.cocos2d.actions.base.CCFiniteTimeAction;
import org.cocos2d.nodes.CCNode;
/**
* Show the node
*/
public class CCShow extends CCInstantAction {
public static CCShow action() {
return new CCShow();
}
@Override
public CCShow copy() {
return new CCSh... |
package org.cocos2d.actions.instant;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.nodes.CCSprite;
/** Flips the sprite horizontally
@since v0.99.0
*/
public class CCFlipX extends CCInstantAction {
boolean flipX;
public static CCFlipX action(boolean fx) {
return new CCFlipX(fx);
}
publ... |
package org.cocos2d.actions.instant;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.CGPoint;
/**
* Places the node in a certain position
*/
public class CCPlace extends CCInstantAction {
private CGPoint position;
public static CCPlace action(CGPoint pnt) {
return new CCPlace(pnt);
}
... |
package org.cocos2d.actions.instant;
import java.lang.reflect.InvocationTargetException;
/**
* Calls a 'callback' with the node as the first argument and the 2nd argument is data
* ND means: Node Data
*/
public class CCCallFuncND extends CCCallFuncN {
protected Object data;
/** creates the action with the call... |
package org.cocos2d.actions.instant;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.nodes.CCSprite;
/** Flips the sprite vertically
@since v0.99.0
*/
public class CCFlipY extends CCInstantAction {
boolean flipY;
public static CCFlipY action(boolean fy) {
return new CCFlipY(fy);
}
public... |
package org.cocos2d.actions.instant;
import org.cocos2d.actions.base.CCFiniteTimeAction;
import org.cocos2d.nodes.CCNode;
/**
* Hide the node
*/
public class CCHide extends CCInstantAction {
public static CCHide action() {
return new CCHide();
}
@Override
public CCHide copy() {
return new CCHi... |
package org.cocos2d.actions.instant;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.cocos2d.nodes.CCNode;
//
// CallFunc
//
/**
* Calls a 'callback'
*/
public class CCCallFunc extends CCInstantAction {
protected Object targetCallback;
protected String selec... |
package org.cocos2d.actions.instant;
import java.lang.reflect.InvocationTargetException;
/**
* Calls a 'callback' with the node as the first argument
* N means Node
*/
public class CCCallFuncN extends CCCallFunc {
public static CCCallFuncN action(Object t, String s) {
return new CCCallFuncN(t, s, new ... |
package org.cocos2d.actions.instant;
import org.cocos2d.actions.ActionCallback;
import org.cocos2d.nodes.CCNode;
//
// CallFunc
//
/**
* Calls a 'callback'
*/
public class CCCallback extends CCInstantAction {
protected ActionCallback callback;
/** creates the action with the callback */
public static ... |
package org.cocos2d.actions;
public interface UpdateCallback {
void update(float d);
}
|
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.nodes.CCNode;
/** Base class for Easing actions
*/
public class CCEaseAction extends CCIntervalAction {
public static final float M_PI_X_2 = (float) (Math.PI * 2.0f);
protected CCIntervalAction other;
... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseInOut extends CCEaseRateAction {
public static CCEaseInOut action(CCIntervalAction action, float rate) {
return new CCEaseInOut(action, rate);
}
protected CCEaseInOut(CCIntervalAction actio... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseBounceInOut extends CCEaseBounce {
public static CCEaseBounceInOut action(CCIntervalAction action) {
return new CCEaseBounceInOut(action);
}
protected CCEaseBounceInOut(CCIntervalAction act... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseBounceOut extends CCEaseBounce {
public static CCEaseBounceOut action(CCIntervalAction action) {
return new CCEaseBounceOut(action);
}
protected CCEaseBounceOut(CCIntervalAction action) {
... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseExponentialIn extends CCEaseAction {
public static CCEaseExponentialIn action(CCIntervalAction action) {
return new CCEaseExponentialIn(action);
}
protected CCEaseExponentialIn(CCIntervalAc... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseBounceIn extends CCEaseBounce {
public static CCEaseBounceIn action(CCIntervalAction action) {
return new CCEaseBounceIn(action);
}
protected CCEaseBounceIn(CCIntervalAction action) {
... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseBackIn extends CCEaseAction {
public static CCEaseBackIn action(CCIntervalAction action) {
return new CCEaseBackIn(action);
}
protected CCEaseBackIn(CCIntervalAction action) {
super... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseElasticOut extends CCEaseElastic {
public static CCEaseElasticOut action(CCIntervalAction action) {
return new CCEaseElasticOut(action, 0.3f);
}
public static CCEaseElasticOut action(CCInte... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseBackInOut extends CCEaseAction {
public static CCEaseBackInOut action(CCIntervalAction action) {
return new CCEaseBackInOut(action);
}
protected CCEaseBackInOut(CCIntervalAction action) {
... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseBackOut extends CCEaseAction {
public static CCEaseBackOut action(CCIntervalAction action) {
return new CCEaseBackOut(action);
}
protected CCEaseBackOut(CCIntervalAction action) {
s... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseSineIn extends CCEaseAction {
public static CCEaseSineIn action(CCIntervalAction action) {
return new CCEaseSineIn(action);
}
protected CCEaseSineIn(CCIntervalAction action) {
super... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
/**
* Base class for Easing actions with rate parameters
*/
public class CCEaseRateAction extends CCEaseAction {
/** rate value for the actions */
float rate;
/** Creates the action with the inner action and the rate parame... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseSineInOut extends CCEaseAction {
public static CCEaseSineInOut action(CCIntervalAction action) {
return new CCEaseSineInOut(action);
}
protected CCEaseSineInOut(CCIntervalAction action) {
... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public abstract class CCEaseBounce extends CCEaseAction {
protected CCEaseBounce(CCIntervalAction action) {
super(action);
}
@Override
public abstract void update(float t);
protected float bounceTime... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseIn extends CCEaseRateAction {
public static CCEaseIn action(CCIntervalAction action, float rate) {
return new CCEaseIn(action, rate);
}
protected CCEaseIn(CCIntervalAction action, float ra... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseExponentialOut extends CCEaseAction {
public static CCEaseExponentialOut action(CCIntervalAction action) {
return new CCEaseExponentialOut(action);
}
protected CCEaseExponentialOut(CCInterv... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
/** Ease Elastic abstract class
@since v0.8.2
*/
public abstract class CCEaseElastic extends CCEaseAction {
/** period of the wave in radians. default is 0.3 */
protected float period_;
/** Initializes the action with the in... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseElasticInOut extends CCEaseElastic {
public static CCEaseElasticInOut action(CCIntervalAction action) {
return new CCEaseElasticInOut(action, 0.3f);
}
public static CCEaseElasticInOut actio... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseExponentialInOut extends CCEaseAction {
public static CCEaseExponentialInOut action(CCIntervalAction action) {
return new CCEaseExponentialInOut(action);
}
protected CCEaseExponentialInOut(... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseElasticIn extends CCEaseElastic {
public static CCEaseElasticIn action(CCIntervalAction action) {
return new CCEaseElasticIn(action, 0.3f);
}
public static CCEaseElasticIn action(CCInterval... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseSineOut extends CCEaseAction {
public static CCEaseSineOut action(CCIntervalAction action) {
return new CCEaseSineOut(action);
}
protected CCEaseSineOut(CCIntervalAction action) {
s... |
package org.cocos2d.actions.ease;
import org.cocos2d.actions.interval.CCIntervalAction;
public class CCEaseOut extends CCEaseRateAction {
public static CCEaseOut action(CCIntervalAction action, float rate) {
return new CCEaseOut(action, rate);
}
protected CCEaseOut(CCIntervalAction action, floa... |
package org.cocos2d.actions;
public interface ActionCallback {
void execute();
}
|
package org.cocos2d.actions;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class CCTimer {
//
// CCTimer
//
/** Light weight timer */
private Object target;
private String selector;
private Method invocation;
/*
* Alternative way... |
package org.cocos2d.actions;
import java.util.ArrayList;
import org.cocos2d.actions.base.CCAction;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.utils.collections.ConcurrentArrayHashMap;
import org.cocos2d.utils.pool.ConcOneClassPool;
import android.util.Log;
/** CCActionManager is a singleton that manages a... |
package org.cocos2d.actions;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.concurrent.ConcurrentHashMap;
import org.cocos2d.config.ccConfig;
import org.cocos2d.utils.collections.ConcurrentArrayHashMap;
//
// CCScheduler
//
/** Schedu... |
package org.cocos2d.actions.camera;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.actions.interval.CCReverseTime;
import org.cocos2d.nodes.CCNode;
/** Base class for CCCamera actions
*/
public abstract class CCCameraAction extends CCIntervalAction {
protected float centerXOrig;
pro... |
package org.cocos2d.actions.camera;
import org.cocos2d.config.ccMacros;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.opengl.CCCamera;
/** CCOrbitCamera action
* Orbits the camera around the center of the screen using spherical coordinates
*/
public class CCOrbitCamera extends CCCameraAction {
private flo... |
package org.cocos2d.actions.grid;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.nodes.CCNode;
////////////////////////////////////////////////////////////
/** CCAccelAmplitude action */
public class CCAccelAmplitude extends CCIntervalAction {
/** amplitude rate */
float rate;
CCInte... |
package org.cocos2d.actions.grid;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCFlipX3D action */
public class CCFlipX3D extends CCGrid3DAction {
/** creates the actio... |
package org.cocos2d.actions.grid;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.actions.interval.CCReverseTime;
import org.cocos2d.grid.CCGridBase;
import org.cocos2d.nodes.CCDirector;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.ccGridSize;
/** Base class for Grid actions */
... |
package org.cocos2d.actions.grid;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCRipple3D action */
public class CCRipple3D extends CCGrid3DAction {
/** center position */
CGPoint positio... |
package org.cocos2d.actions.grid;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCLens3D action */
public class CCLens3D extends CCGrid3DAction {
CGPoint position;
float radius;
/** len... |
package org.cocos2d.actions.grid;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.ccGridSize;
/** CCWaves3D action */
public class CCWaves3D extends CCGrid3DAction {
int waves;
/** amplitude of the wave */
float amplitude;
/** amplitude rate of the wave */
float amplitudeRate;
public static CCWa... |
package org.cocos2d.actions.grid;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCFlipY3D action */
public class CCFlipY3D extends CCFlipX3D {
public static CCIntervalAc... |
package org.cocos2d.actions.grid;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCWaves action */
public class CCWaves extends CCGrid3DAction {
int waves;
/** amplitude */
float amplitude;
/** amplitude rate */
float ... |
package org.cocos2d.actions.grid;
import org.cocos2d.actions.instant.CCInstantAction;
import org.cocos2d.grid.CCGridBase;
import org.cocos2d.nodes.CCNode;
////////////////////////////////////////////////////////////
/** CCStopGrid action.
Don't call this action if another grid action is active.
Call if you want to... |
package org.cocos2d.actions.grid;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.nodes.CCNode;
////////////////////////////////////////////////////////////
/** CCAccelDeccelAmplitude action */
public class CCAccelDeccelAmplitude extends CCIntervalAction {
/** amplitude rate */
float ra... |
package org.cocos2d.actions.grid;
import org.cocos2d.grid.CCGrid3D;
import org.cocos2d.grid.CCGridBase;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.ccGridSize;
/** Base class for CCGrid3D actions.
Grid3D actions can modify a non-tiled grid.
*/
public class CCGrid3DAction extends CCGridAction {
pub... |
package org.cocos2d.actions.grid;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCLiquid action */
public class CCLiquid extends CCGrid3DAction {
int waves;
/** amplitude */
float amplitude;
/** amplitude rate */
float ... |
package org.cocos2d.actions.grid;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
/** CCTwirl action */
public class CCTwirl extends CCGrid3DAction {
/** twirl center */
CGPoint position;
int twirls;
/** amplitude */
float amplitude;
/** amplitude ra... |
package org.cocos2d.actions.grid;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.nodes.CCNode;
////////////////////////////////////////////////////////////
/** CCDeccelAmplitude action */
public class CCDeccelAmplitude extends CCIntervalAction {
/** amplitude rate */
float rate;
CCInte... |
package org.cocos2d.actions.grid;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCShaky3D action */
public class CCShaky3D extends CCGrid3DAction {
int randrange;
boolean shakeZ;
/** creates the action with a range, sha... |
package org.cocos2d.actions.grid;
import org.cocos2d.config.ccMacros;
import org.cocos2d.types.CCVertex3D;
import org.cocos2d.types.ccGridSize;
/**
* This action simulates a page turn from the bottom right hand corner of the screen
* It's not much use by itself but is used by the PageTurnTransition.
*
* Based on ... |
package org.cocos2d.actions.grid;
import org.cocos2d.actions.instant.CCInstantAction;
import org.cocos2d.grid.CCGridBase;
import org.cocos2d.nodes.CCNode;
////////////////////////////////////////////////////////////
/** CCReuseGrid action */
public class CCReuseGrid extends CCInstantAction {
int t;
/** creates a... |
package org.cocos2d.actions;
import java.nio.FloatBuffer;
import javax.microedition.khronos.opengles.GL10;
import org.cocos2d.config.ccConfig;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.nodes.CCSprite;
import org.cocos2d.nodes.CCTextureCache;
import org.cocos2d.opengl.CCTexture2D;
import org.cocos2d.types.C... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCFadeOutDownTiles action.
Fades out the tiles in downwards direction
*/
public class CCFadeOutDownTiles extends CCFadeOutUpTiles {
public stati... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
////////////////////////////////////////////////////////////
/** CCShatteredTiles3D action */
public class CCShatteredTiles3D extends CCTiledGrid3DAction {
int randrange;
boolean once;
boolean shatterZ;
... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
////////////////////////////////////////////////////////////
/** CCWavesTiles3D action. */
public class CCWavesTiles3D extends CCTiledGrid3DAction {
int waves;
/** waves amplitude */
float amplitude;
/** waves ... |
package org.cocos2d.actions.tile;
import java.util.Random;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
/** CCTurnOffTiles action.
Turn off the files in random order
*/
public class CCTurnOffTiles extends CCTiledGrid3DAction {
Random rand;
int seed;
int... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
////////////////////////////////////////////////////////////
/** CCFadeOutUpTiles action.
Fades out the tiles in upwards direction
*/
public class CCFadeOutUpTiles extends CCFa... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
public class Tile {
CGPoint position;
CGPoint startPosition;
ccGridSize delta;
public static Tile make(CGPoint pos, CGPoint startPos, ccGridSize gs) {
return new Tile(pos, startPos, gs);
}
... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
////////////////////////////////////////////////////////////
/** CCFadeOutBLTiles action.
Fades out the tiles in a Bottom-Left direction
*/
public class CCFadeOutBLTiles extends CCFadeOutTRTiles {
public stat... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
////////////////////////////////////////////////////////////
/** CCJumpTiles3D action.
A sin function is executed to move the tiles across the Z axis
*/
public class CCJumpTiles3D extends CCTiledGrid3DAction {... |
package org.cocos2d.actions.tile;
import org.cocos2d.nodes.CCDirector;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.CGSize;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
////////////////////////////////////////////////////////////
/** CCSplitCols action */
public class CCSplitCo... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
/** CCShakyTiles3D action */
public class CCShakyTiles3D extends CCTiledGrid3DAction {
int randrange;
boolean shakeZ;
/** creates the action with a range, whether or not to shake Z vertices, a grid size, ... |
package org.cocos2d.actions.tile;
import org.cocos2d.actions.grid.CCGridAction;
import org.cocos2d.grid.CCGridBase;
import org.cocos2d.grid.CCTiledGrid3D;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
////////////////////////////////////////////////////////////
/** Base class for CCTiledGrid... |
package org.cocos2d.actions.tile;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
////////////////////////////////////////////////////////////
/** CCFadeOutTRTiles action
Fades out the tiles in a Top-Right direction
*/
public class CCFadeOutTRTiles extends C... |
package org.cocos2d.actions.tile;
import org.cocos2d.nodes.CCDirector;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.CGSize;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
////////////////////////////////////////////////////////////
/** CCSplitRows action */
public class CCSplitRo... |
package org.cocos2d.actions.tile;
import java.util.Random;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.ccGridSize;
import org.cocos2d.types.ccQuad3;
/** CCShuffleTiles action
Shuffle the tiles in random order
*/
public class CCShuffleTiles extends CCTiledGrid3DActi... |
package org.cocos2d.utils;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.ShortBuffer;
import javax.microedition.khronos.opengles... |
package org.cocos2d.utils;
/**
* <p>Encodes and decodes to and from Base64 notation.</p>
* <p>Homepage: <a href="http://iharder.net/base64">http://iharder.net/base64</a>.</p>
*
* <p>Example:</p>
*
* <code>String encoded = Base64.encode( myByteArray );</code>
* <br />
* <code>byte[] myByteArray = Base64.decod... |
package org.cocos2d.utils;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.CGRect;
import org.cocos2d.types.CGSize;
public class GeometryUtil {
public static CGPoint CGPointFromString(String str) {
String coords = str.replaceAll("[{|}]", "");
String c[] = coords.split(",");
return CGPoint.make(Floa... |
/*
* Javolution - Java(TM) Solution for Real-Time and Embedded Systems
* Copyright (C) 2006 - Javolution (http://javolution.org/)
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software is
* freely granted, provided that this notice is preserved.
*/
package org.cocos2d.utils.jav... |
/*
* Javolution - Java(TM) Solution for Real-Time and Embedded Systems
* Copyright (C) 2006 - Javolution (http://javolution.org/)
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software is
* freely granted, provided that this notice is preserved.
*/
package org.cocos2d.utils.jav... |
package org.cocos2d.utils.collections;
import java.util.Iterator;
import org.cocos2d.utils.collections.IntMap.Entry;
/**
* Taken from http://code.google.com/p/skorpios/
*
* @author Nate
*/
public final class IntMap<T> implements Iterable<Entry<T>>, Cloneable {
private Entry<T>[] table;
private final f... |
package org.cocos2d.utils.collections;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
public class ConcNodeCachingLinkedQueue<E> {
private static class Node<E> {
volatile E item;
volatile Node<E> next;
@SuppressWarnings("rawtypes")
private static final
Ato... |
package org.cocos2d.utils.collections;
import java.util.ArrayList;
import java.util.HashMap;
import org.cocos2d.utils.pool.OneClassPool;
/**
* This class is temporary replacement of ConcurrentHashMap<K,V> for frequently
* iterating through values. See firstValue, nextValue methods.
* Do not use this outside, thi... |
package org.cocos2d.utils.collections;
import java.util.ArrayList;
import java.util.concurrent.locks.ReentrantLock;
/**
* Nonblocking stack, array based.
* @author genius
*
*/
public class ConcArrayStack<T> {
private ArrayList<T> array = new ArrayList<T>();
private final ReentrantLock lock = new ReentrantLock(... |
package org.cocos2d.utils.collections;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
/**
* This is simple non-blocking stack implementation using Treiber's algorithm.
* @author genius
*/
public class ConcNodeCachingStack<T> {
private static class Node<T> {
volatile T item;
vo... |
package org.cocos2d.utils.pool;
import java.util.HashMap;
@SuppressWarnings({ "rawtypes", "unchecked" })
public class ObjectPool {
private HashMap<Class<?>, OneClassPool<?>> lists;
public ObjectPool() {
lists = new HashMap<Class<?>, OneClassPool<?>>();
}
public <T> OneClassPool<T> registerPool(Class<T> clazz... |
package org.cocos2d.utils.pool;
import org.cocos2d.utils.collections.ConcNodeCachingStack;
public abstract class ConcOneClassPool<T> {
private ConcNodeCachingStack<T> objs;
public ConcOneClassPool() {
objs = new ConcNodeCachingStack<T>();
}
protected abstract T allocate();
public T get() {
T ret = objs.p... |
package org.cocos2d.utils.pool;
import java.util.ArrayList;
public abstract class OneClassPool<T> {
private ArrayList<T> objs;
public OneClassPool() {
objs = new ArrayList<T>();
}
protected abstract T allocate();
public T get() {
int s = objs.size();
if(0 != s) {
return objs.remove(s-1);
} else {
... |
package org.cocos2d.utils;
import java.io.IOException;
import java.io.InputStream;
import org.cocos2d.nodes.CCDirector;
/**
* Class can register ContentProvider for loading resources from input stream,
* Default is using assets provider.
*/
public class ContentHelper {
private static ContentHelper sContent... |
package org.cocos2d.utils;
import android.view.MotionEvent;
public class Util5 {
public static int getPointerId(MotionEvent event, int pindex) {
return event.getPointerId(pindex);
}
public static float getX(MotionEvent event, int pindex) {
return event.getX(pindex);
}
public static float getY(MotionEvent e... |
package org.cocos2d.utils;
import java.util.Formatter;
public class CCFormatter {
private static StringBuilder sb = new StringBuilder(50);
private static Formatter formatter = new Formatter(sb);
public synchronized static String format(String s, Object... objects) {
sb.setLength(0);
formatte... |
package org.cocos2d.utils;
import org.cocos2d.nodes.CCDirector;
import android.content.pm.PackageManager;
/**
* Methods are available in 2.1 and above only.
*/
public class Util7 {
/**
* using:
* if(Build.VERSION.SDK_INT >= 7) {
supportsMultiTouch = Util7.isMultiTouchSupported();
}
*/
public ... |
package org.cocos2d.utils;
import java.nio.FloatBuffer;
import android.os.Build;
public class BufferUtils {
/**
* Copy with JNI for devices prior GINGERBREAD(api 9), put for newer versions(HTC Sensation has faster put(float[]) )
*/
public static void copyFloats(float[] src, int srcOffset, FloatBuffer dst, in... |
package org.cocos2d.utils;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import org.cocos2d.config.ccMacros;
import org.cocos2d.nodes.CCDirector;
import org.cocos2d.types.CGPoint;
import org.cocos2d.types.CGRect;
import org.cocos2d.types.CGSize;... |
package org.cocos2d.utils;
import org.cocos2d.types.CGAffineTransform;
public class TransformUtils {
public static void CCAffineToGL(final CGAffineTransform t, float[] m)
{
// | m[0] m[4] m[8] m[12] | | m11 m21 m31 m41 | | a c 0 tx |
// | m[1] m[5] m[9] m[13] | | m12 m22 m32 m42... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.