Remove __instanceId from Node and Component (#2627)

* Add Scheduler.enableForTarget and change to use  _id

* Use _id instead of __instanceId in Texture2D

* Fix ParticleSystem __instanceId usage

* Use _id instead of __instanceId in ActionManager

* Fix usage of Scheduler in InputManager

* Use _id instead of __instanceId in EventManager

* Totally remove ClassManager and __instanceId

* Fix initialization process

* Fix touch & mouse listener off check issue

* Fix id not generated issue

* Fix touch & mouse listener being removed by rejected persist node

* Improve logic
This commit is contained in:
pandamicro
2018-05-04 13:51:21 +08:00
committed by GitHub
parent f3304e626b
commit e597e34f4f
19 changed files with 235 additions and 168 deletions
+1 -1
View File
@@ -1331,7 +1331,7 @@ var ParticleSystem = cc.Class({
if (!this._material) {
this._material = new ParticleMaterial();
// Particle System cannot be batched, so every one use a unique hash id
this._material.updateHash(this.__instanceId);
this._material.updateHash(this._id);
}
let vfx = this._vfx;