Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make cocos2d 'strict mode' compatible #3561

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cocos2d/actions/CCActionInterval.js
Original file line number Diff line number Diff line change
Expand Up @@ -3393,8 +3393,8 @@ cc.Animate = cc.ActionInterval.extend(/** @lends cc.Animate# */{
var numberOfFrames = frames.length, locSplitTimes = this._splitTimes;
for (var i = this._nextFrame; i < numberOfFrames; i++) {
if (locSplitTimes[i] <= dt) {
_currFrameIndex = i;
this.target.setSpriteFrame(frames[_currFrameIndex].getSpriteFrame());
this._currFrameIndex = i;
this.target.setSpriteFrame(frames[this._currFrameIndex].getSpriteFrame());
this._nextFrame = i + 1;
} else {
// Issue 1438. Could be more than one frame per tick, due to low frame rate or frame delta < 1/FPS
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/platform/CCInputExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ _p.didAccelerate = function (eventData) {
}
};

delete _p;
_p = null;
2 changes: 1 addition & 1 deletion cocos2d/core/platform/CCScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cc.screen = /** @lends cc.screen# */{
init: function () {
this._fn = {};
var i, val, map = this._fnMap, valL;
for (i = 0, l = map.length; i < l; i++) {
for (i = 0; i < map.length; i++) {
val = map[i];
if (val && val[1] in document) {
for (i = 0, valL = val.length; i < valL; i++) {
Expand Down