Browse Search Popular Register Upload Rules User list Login:
Search:
this is abc1's new account, also it work like this, red's onCollide = (e)=>{e.other.materialName == "marble" ? {e.other.color = color; e.other.onCollide = onCollide} : {}}
so, the e.other.materialName == "marble" ? {} : {} use to check if the object it touch's materialName is "marble" if it is, it'll do what the first {} tell, in this case, the first {} tell e.other.color = color; e.other.onCollide = onCollide
the e.other.color = color is changing the object touch's color to be same as its color, and the e.other.onCollide = on.Collide use to change the object it touch's onCollide script to be the same as its onCollide script
You can really do that with scene.AddCircle if my memory was right
dafuq? it's just a picture
Nice!!