mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
Merge pull request #1866 from 2youyou2/master
improve WrappedInfo.prototype.set performance
This commit is contained in:
@@ -84,12 +84,16 @@ function WrappedInfo (info) {
|
||||
this.direction = 1;
|
||||
this.stopped = true;
|
||||
this.iterations = 0;
|
||||
this.frameIndex = undefined;
|
||||
}
|
||||
|
||||
WrappedInfo.prototype.set = function (info) {
|
||||
for (var k in info) {
|
||||
this[k] = info[k];
|
||||
}
|
||||
this.ratio = info.ratio;
|
||||
this.time = info.time;
|
||||
this.direction = info.direction;
|
||||
this.stopped = info.stopped;
|
||||
this.iterations = info.iterations;
|
||||
this.frameIndex = info.frameIndex;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user