mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
Remove native actionManager from jsb
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
|
||||
// Define singleton objects
|
||||
cc.director = cc.Director.getInstance();
|
||||
// cc.director._actionManager = cc.director.getActionManager();
|
||||
cc.director._scheduler = cc.director.getScheduler();
|
||||
cc.winSize = cc.director.getWinSize();
|
||||
|
||||
|
||||
@@ -195,345 +195,6 @@ _p._ctor = function(tmxFile, resourcePath){
|
||||
}
|
||||
};
|
||||
|
||||
/************************ Actions *************************/
|
||||
|
||||
cc.Speed.prototype._ctor = function(action, speed) {
|
||||
speed !== undefined && this.initWithAction(action, speed);
|
||||
};
|
||||
|
||||
cc.Follow.prototype._ctor = function (followedNode, rect) {
|
||||
if(followedNode)
|
||||
rect ? this.initWithTarget(followedNode, rect)
|
||||
: this.initWithTarget(followedNode);
|
||||
};
|
||||
|
||||
cc.OrbitCamera.prototype._ctor = function (t, radius, deltaRadius, angleZ, deltaAngleZ, angleX, deltaAngleX) {
|
||||
deltaAngleX !== undefined && this.initWithDuration(t, radius, deltaRadius, angleZ, deltaAngleZ, angleX, deltaAngleX);
|
||||
};
|
||||
|
||||
cc.CardinalSplineTo.prototype._ctor = cc.CardinalSplineBy.prototype._ctor = function(duration, points, tension) {
|
||||
tension !== undefined && this.initWithDuration(duration, points, tension);
|
||||
};
|
||||
|
||||
cc.CatmullRomTo.prototype._ctor = cc.CatmullRomBy.prototype._ctor = function(dt, points) {
|
||||
points !== undefined && this.initWithDuration(dt, points);
|
||||
};
|
||||
|
||||
var easeCtor = function(action) {
|
||||
action !== undefined && this.initWithAction(action);
|
||||
};
|
||||
|
||||
cc.ActionEase.prototype._ctor = easeCtor;
|
||||
cc.EaseExponentialIn.prototype._ctor = easeCtor;
|
||||
cc.EaseExponentialOut.prototype._ctor = easeCtor;
|
||||
cc.EaseExponentialInOut.prototype._ctor = easeCtor;
|
||||
cc.EaseSineIn.prototype._ctor = easeCtor;
|
||||
cc.EaseSineOut.prototype._ctor = easeCtor;
|
||||
cc.EaseSineInOut.prototype._ctor = easeCtor;
|
||||
cc.EaseBounce.prototype._ctor = easeCtor;
|
||||
cc.EaseBounceIn.prototype._ctor = easeCtor;
|
||||
cc.EaseBounceOut.prototype._ctor = easeCtor;
|
||||
cc.EaseBounceInOut.prototype._ctor = easeCtor;
|
||||
cc.EaseBackIn.prototype._ctor = easeCtor;
|
||||
cc.EaseBackOut.prototype._ctor = easeCtor;
|
||||
cc.EaseBackInOut.prototype._ctor = easeCtor;
|
||||
|
||||
var easeRateCtor = function(action, rate) {
|
||||
rate !== undefined && this.initWithAction(action, rate);
|
||||
};
|
||||
cc.EaseRateAction.prototype._ctor = easeRateCtor;
|
||||
cc.EaseIn.prototype._ctor = easeRateCtor;
|
||||
cc.EaseOut.prototype._ctor = easeRateCtor;
|
||||
cc.EaseInOut.prototype._ctor = easeRateCtor;
|
||||
|
||||
var easeElasticCtor = function(action, period) {
|
||||
if( action ) {
|
||||
period !== undefined ? this.initWithAction(action, period)
|
||||
: this.initWithAction(action);
|
||||
}
|
||||
};
|
||||
cc.EaseElastic.prototype._ctor = easeElasticCtor;
|
||||
cc.EaseElasticIn.prototype._ctor = easeElasticCtor;
|
||||
cc.EaseElasticOut.prototype._ctor = easeElasticCtor;
|
||||
cc.EaseElasticInOut.prototype._ctor = easeElasticCtor;
|
||||
|
||||
cc.ReuseGrid.prototype._ctor = function(times) {
|
||||
times !== undefined && this.initWithTimes(times);
|
||||
};
|
||||
|
||||
var durationCtor = function(duration, gridSize) {
|
||||
gridSize && this.initWithDuration(duration, gridSize);
|
||||
};
|
||||
|
||||
cc.GridAction.prototype._ctor = durationCtor;
|
||||
cc.Grid3DAction.prototype._ctor = durationCtor;
|
||||
cc.TiledGrid3DAction.prototype._ctor = durationCtor;
|
||||
cc.PageTurn3D.prototype._ctor = durationCtor;
|
||||
cc.FadeOutTRTiles.prototype._ctor = durationCtor;
|
||||
cc.FadeOutBLTiles.prototype._ctor = durationCtor;
|
||||
cc.FadeOutUpTiles.prototype._ctor = durationCtor;
|
||||
cc.FadeOutDownTiles.prototype._ctor = durationCtor;
|
||||
|
||||
|
||||
cc.Twirl.prototype._ctor = function(duration, gridSize, position, twirls, amplitude) {
|
||||
amplitude !== undefined && this.initWithDuration(duration, gridSize, position, twirls, amplitude);
|
||||
};
|
||||
|
||||
cc.Waves.prototype._ctor = function(duration, gridSize, waves, amplitude, horizontal, vertical) {
|
||||
vertical !== undefined && this.initWithDuration(duration, gridSize, waves, amplitude, horizontal, vertical);
|
||||
};
|
||||
|
||||
cc.Liquid.prototype._ctor = function(duration, gridSize, waves, amplitude) {
|
||||
amplitude !== undefined && this.initWithDuration(duration, gridSize, waves, amplitude);
|
||||
};
|
||||
|
||||
cc.Shaky3D.prototype._ctor = function(duration, gridSize, range, shakeZ) {
|
||||
shakeZ !== undefined && this.initWithDuration(duration, gridSize, range, shakeZ);
|
||||
};
|
||||
|
||||
cc.Ripple3D.prototype._ctor = function(duration, gridSize, position, radius, waves, amplitude) {
|
||||
amplitude !== undefined && this.initWithDuration(duration, gridSize, position, radius, waves, amplitude);
|
||||
};
|
||||
|
||||
cc.Lens3D.prototype._ctor = function(duration, gridSize, position, radius) {
|
||||
radius !== undefined && this.initWithDuration(duration, gridSize, position, radius);
|
||||
};
|
||||
|
||||
cc.FlipY3D.prototype._ctor = cc.FlipX3D.prototype._ctor = function(duration) {
|
||||
duration !== undefined && this.initWithDuration(duration, cc.size(1, 1));
|
||||
};
|
||||
|
||||
cc.Waves3D.prototype._ctor = function(duration, gridSize, waves, amplitude) {
|
||||
amplitude !== undefined && this.initWithDuration(duration, gridSize, waves, amplitude);
|
||||
};
|
||||
|
||||
cc.RemoveSelf.prototype._ctor = function(isNeedCleanUp) {
|
||||
isNeedCleanUp !== undefined && cc.RemoveSelf.prototype.init.call(this, isNeedCleanUp);
|
||||
};
|
||||
|
||||
cc.FlipX.prototype._ctor = function(flip) {
|
||||
flip !== undefined && this.initWithFlipX(flip);
|
||||
};
|
||||
|
||||
cc.FlipY.prototype._ctor = function(flip) {
|
||||
flip !== undefined && this.initWithFlipY(flip);
|
||||
};
|
||||
|
||||
cc.Place.prototype._ctor = function(pos, y) {
|
||||
if (pos !== undefined) {
|
||||
if (pos.x !== undefined) {
|
||||
y = pos.y;
|
||||
pos = pos.x;
|
||||
}
|
||||
this.initWithPosition(cc.p(pos, y));
|
||||
}
|
||||
};
|
||||
|
||||
cc.CallFunc.prototype._ctor = function(selector, selectorTarget, data) {
|
||||
if(selector !== undefined){
|
||||
if(selectorTarget === undefined)
|
||||
this.initWithFunction(selector);
|
||||
else this.initWithFunction(selector, selectorTarget, data);
|
||||
}
|
||||
};
|
||||
|
||||
cc.ActionInterval.prototype._ctor = function(d) {
|
||||
d !== undefined && this.initWithDuration(d);
|
||||
};
|
||||
|
||||
cc.Sequence.prototype._ctor = function(tempArray) {
|
||||
var paramArray = (tempArray instanceof Array) ? tempArray : arguments;
|
||||
var last = paramArray.length - 1;
|
||||
if ((last >= 0) && (paramArray[last] == null))
|
||||
cc.log('parameters should not be ending with null in Javascript');
|
||||
|
||||
if (last >= 0) {
|
||||
var prev = paramArray[0];
|
||||
for (var i = 1; i < last; i++) {
|
||||
if (paramArray[i]) {
|
||||
prev = cc.Sequence.create(prev, paramArray[i]);
|
||||
}
|
||||
}
|
||||
this.initWithTwoActions(prev, paramArray[last]);
|
||||
}
|
||||
};
|
||||
|
||||
cc.Repeat.prototype._ctor = function(action, times) {
|
||||
times !== undefined && this.initWithAction(action, times);
|
||||
};
|
||||
|
||||
cc.RepeatForever.prototype._ctor = function(action) {
|
||||
action !== undefined && this.initWithAction(action);
|
||||
};
|
||||
|
||||
cc.Spawn.prototype._ctor = function(tempArray) {
|
||||
var paramArray = (tempArray instanceof Array) ? tempArray : arguments;
|
||||
var last = paramArray.length - 1;
|
||||
if ((last >= 0) && (paramArray[last] == null))
|
||||
cc.log('parameters should not be ending with null in Javascript');
|
||||
|
||||
if (last >= 0) {
|
||||
var prev = paramArray[0];
|
||||
for (var i = 1; i < last; i++) {
|
||||
if (paramArray[i]) {
|
||||
prev = cc.Spawn.create(prev, paramArray[i]);
|
||||
}
|
||||
}
|
||||
this.initWithTwoActions(prev, paramArray[last]);
|
||||
}
|
||||
};
|
||||
|
||||
cc.RotateTo.prototype._ctor = cc.RotateBy.prototype._ctor = function(duration, deltaAngleX, deltaAngleY) {
|
||||
if (deltaAngleX !== undefined) {
|
||||
if (deltaAngleY !== undefined)
|
||||
this.initWithDuration(duration, deltaAngleX, deltaAngleY);
|
||||
else
|
||||
this.initWithDuration(duration, deltaAngleX, deltaAngleX);
|
||||
}
|
||||
};
|
||||
|
||||
cc.MoveBy.prototype._ctor = cc.MoveTo.prototype._ctor = function(duration, pos, y) {
|
||||
if (pos !== undefined) {
|
||||
if(pos.x === undefined) {
|
||||
pos = cc.p(pos, y);
|
||||
}
|
||||
|
||||
this.initWithDuration(duration, pos);
|
||||
}
|
||||
};
|
||||
|
||||
cc.SkewTo.prototype._ctor = cc.SkewBy.prototype._ctor = function(t, sx, sy) {
|
||||
sy !== undefined && this.initWithDuration(t, sx, sy);
|
||||
};
|
||||
|
||||
cc.JumpBy.prototype._ctor = cc.JumpTo.prototype._ctor = function(duration, position, y, height, jumps) {
|
||||
if (height !== undefined) {
|
||||
if (jumps !== undefined) {
|
||||
position = cc.p(position, y);
|
||||
}
|
||||
else {
|
||||
jumps = height;
|
||||
height = y;
|
||||
}
|
||||
this.initWithDuration(duration, position, height, jumps);
|
||||
}
|
||||
};
|
||||
|
||||
cc.BezierBy.prototype._ctor = cc.BezierTo.prototype._ctor = function(t, c) {
|
||||
c !== undefined && this.initWithDuration(t, c);
|
||||
};
|
||||
|
||||
cc.ScaleTo.prototype._ctor = cc.ScaleBy.prototype._ctor = function(duration, sx, sy) {
|
||||
if (sx !== undefined) {
|
||||
if (sy !== undefined)
|
||||
this.initWithDuration(duration, sx, sy);
|
||||
else this.initWithDuration(duration, sx);
|
||||
}
|
||||
};
|
||||
|
||||
cc.Blink.prototype._ctor = function(duration, blinks) {
|
||||
blinks !== undefined && this.initWithDuration(duration, blinks);
|
||||
};
|
||||
|
||||
cc.FadeTo.prototype._ctor = function(duration, opacity) {
|
||||
opacity !== undefined && this.initWithDuration(duration, opacity);
|
||||
};
|
||||
|
||||
cc.FadeIn.prototype._ctor = function(duration) {
|
||||
duration !== undefined && this.initWithDuration(duration, 255);
|
||||
};
|
||||
|
||||
cc.FadeOut.prototype._ctor = function(duration) {
|
||||
duration !== undefined && this.initWithDuration(duration, 0);
|
||||
};
|
||||
|
||||
cc.TintTo.prototype._ctor = cc.TintBy.prototype._ctor = function(duration, red, green, blue) {
|
||||
blue !== undefined && this.initWithDuration(duration, red, green, blue);
|
||||
};
|
||||
|
||||
cc.DelayTime.prototype._ctor = function(duration) {
|
||||
duration !== undefined && this.initWithDuration(duration);
|
||||
};
|
||||
/*
|
||||
cc.ReverseTime.prototype._ctor = function(action) {
|
||||
action && this.initWithAction(action);
|
||||
};*/
|
||||
|
||||
cc.Animate.prototype._ctor = function(animation) {
|
||||
animation && this.initWithAnimation(animation);
|
||||
};
|
||||
|
||||
cc.TargetedAction.prototype._ctor = function(target, action) {
|
||||
action && this.initWithTarget(target, action);
|
||||
};
|
||||
|
||||
cc.ProgressTo.prototype._ctor = function(duration, percent) {
|
||||
percent !== undefined && this.initWithDuration(duration, percent);
|
||||
};
|
||||
|
||||
cc.ProgressFromTo.prototype._ctor = function(duration, fromPercentage, toPercentage) {
|
||||
toPercentage !== undefined && this.initWithDuration(duration, fromPercentage, toPercentage);
|
||||
};
|
||||
|
||||
cc.SplitCols.prototype._ctor = cc.SplitRows.prototype._ctor = function(duration, rowsCols) {
|
||||
rowsCols !== undefined && this.initWithDuration(duration, rowsCols);
|
||||
};
|
||||
|
||||
cc.JumpTiles3D.prototype._ctor = function(duration, gridSize, numberOfJumps, amplitude) {
|
||||
amplitude !== undefined && this.initWithDuration(duration, gridSize, numberOfJumps, amplitude);
|
||||
};
|
||||
|
||||
cc.WavesTiles3D.prototype._ctor = function(duration, gridSize, waves, amplitude) {
|
||||
amplitude !== undefined && this.initWithDuration(duration, gridSize, waves, amplitude);
|
||||
};
|
||||
|
||||
cc.TurnOffTiles.prototype._ctor = function(duration, gridSize, seed) {
|
||||
if (gridSize !== undefined) {
|
||||
seed = seed || 0;
|
||||
this.initWithDuration(duration, gridSize, seed);
|
||||
}
|
||||
};
|
||||
|
||||
cc.ShakyTiles3D.prototype._ctor = function(duration, gridSize, range, shakeZ) {
|
||||
shakeZ !== undefined && this.initWithDuration(duration, gridSize, range, shakeZ);
|
||||
};
|
||||
|
||||
cc.ShatteredTiles3D.prototype._ctor = function(duration, gridSize, range, shatterZ) {
|
||||
shatterZ !== undefined && this.initWithDuration(duration, gridSize, range, shatterZ);
|
||||
};
|
||||
|
||||
cc.ShuffleTiles.prototype._ctor = function(duration, gridSize, seed) {
|
||||
seed !== undefined && this.initWithDuration(duration, gridSize, seed);
|
||||
};
|
||||
|
||||
cc.ActionTween.prototype._ctor = function(duration, key, from, to) {
|
||||
to !== undefined && this.initWithDuration(duration, key, from, to);
|
||||
};
|
||||
|
||||
cc.Animation.prototype._ctor = function(frames, delay, loops) {
|
||||
if (frames === undefined) {
|
||||
this.init();
|
||||
} else {
|
||||
var frame0 = frames[0];
|
||||
delay = delay === undefined ? 0 : delay;
|
||||
loops = loops === undefined ? 1 : loops;
|
||||
if(frame0){
|
||||
if (frame0 instanceof cc.SpriteFrame) {
|
||||
//init with sprite frames , delay and loops.
|
||||
this.initWithSpriteFrames(frames, delay, loops);
|
||||
}else if(frame0 instanceof cc.AnimationFrame) {
|
||||
//init with sprite frames , delay and loops.
|
||||
this.initWithAnimationFrames(frames, delay, loops);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
cc.AnimationFrame.prototype._ctor = function(spriteFrame, delayUnits, userInfo) {
|
||||
delayUnits !== undefined && this.initWithSpriteFrame(spriteFrame, delayUnits, userInfo);
|
||||
};
|
||||
|
||||
|
||||
/************************ Nodes *************************/
|
||||
|
||||
cc.ClippingNode.prototype._ctor = function(stencil) {
|
||||
|
||||
@@ -34,9 +34,6 @@ cc.Node.prototype.attr = function(attrs) {
|
||||
}
|
||||
};
|
||||
|
||||
var _proto = cc.Action.prototype;
|
||||
cc.defineGetterSetter(_proto, "tag", _proto.getTag, _proto.setTag);
|
||||
|
||||
// Overrides
|
||||
_proto = cc.Label.prototype;
|
||||
cc.defineGetterSetter(_proto, "size", _proto.getContentSize, _proto.setContentSize);
|
||||
@@ -109,7 +106,6 @@ cc.defineGetterSetter(_proto, "parent", _proto.getParent, _proto.setParent);
|
||||
cc.defineGetterSetter(_proto, "visible", _proto.isVisible, _proto.setVisible);
|
||||
cc.defineGetterSetter(_proto, "running", _proto.isRunning);
|
||||
cc.defineGetterSetter(_proto, "ignoreAnchor", _proto.isIgnoreAnchorPointForPosition, _proto.ignoreAnchorPointForPosition);
|
||||
cc.defineGetterSetter(_proto, "actionManager", _proto.getActionManager, _proto.setActionManager);
|
||||
cc.defineGetterSetter(_proto, "scheduler", _proto.getScheduler, _proto.setScheduler);
|
||||
cc.defineGetterSetter(_proto, "shaderProgram", _proto.getShaderProgram, _proto.setShaderProgram);
|
||||
cc.defineGetterSetter(_proto, "glServerState", _proto.getGLServerState, _proto.setGLServerState);
|
||||
|
||||
@@ -46,7 +46,7 @@ skip = Node::[^setPosition$ setGLServerState description getUserObject .*UserDat
|
||||
SpriteBatchNode::[getDescendants],
|
||||
MotionStreak::[draw update],
|
||||
DrawNode::[drawPoly$ listenBackToForeground],
|
||||
Director::[getAccelerometer getProjection getFrustum getRenderer getConsole getCocos2dThreadId],
|
||||
Director::[getActionManager setActionManager getAccelerometer getProjection getFrustum getRenderer getConsole getCocos2dThreadId],
|
||||
Layer.*::[didAccelerate keyPressed keyReleased],
|
||||
Menu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns],
|
||||
MenuItemToggle::[initWithCallback],
|
||||
|
||||
Reference in New Issue
Block a user