Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17076

How can I use tag from Collider Component?

$
0
0

@luke2125 wrote:

Hi,

I'm using the simple method for colliding between objects in my game, like the following:

properties: {
zombiecolliderobjects:{
default:[],
type: [cc.Prefab]
},
},

onCollisionEnter:function(other,self){
this.node.color = cc.Color.RED;
this.touchingNumber ++;
if(cc.rectIntersectsRect(this.node.getBoundingBox(),this.zombiecolliderobjects[0]))
{this.ZombieBulletLeftHit()}

However, how can I use tag for colliding objects? The tag that's in the box collider component? Or is it possible? Would appreciate any help.......Thanks and God Bless....

Sincerely,

Sunday

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>