//collision callback, here we release some explode effect at the collison pos. void OnMissileCollision(Xft.CollisionParam param) { XffectComponent eft = EffectCache.GetEffect("explode"); eft.transform.position = param.CollidePos; eft.Active(); }
void OnPlaneCollision(Xft.CollisionParam param) { //GameObject g = param.CollideObject; //Vector3 pos = param.CollidePos; Xft.EffectNode ef = param.effectNode; ef.SetBounce(); //Debug.Log("collision is "+g+" "+pos); }
//callback function. void OnCollision(Xft.CollisionParam param) { Debug.Log("collision detect!, object:" + param.CollideObject.name + " collide pos:" + param.CollidePos); }
void OnConcentrateHit(Xft.CollisionParam param) { EffectCache.ReleaseEffect("exp_small", param.CollidePos); }
//collisions void OnSpreadHit(Xft.CollisionParam param) { EffectCache.ReleaseEffect("exp_small", param.CollidePos); }