//------------------------------------------------------------------------- void _setTrigger(bool isTrigger) { mTurretBaseSprite.setTrigger(isTrigger); mTurretTopSprite.setTrigger(isTrigger); //mTurretBlazeSprite.setTrigger(isTrigger); mTurretBarrelSprite.setTrigger(isTrigger); }
//------------------------------------------------------------------------- public void create(CRenderScene scene, CRenderBullet render_bullet, string animation_name, TbDataParticle hit_particle) { mScene = scene; mBullet = render_bullet; mHitParticle = hit_particle; mStillSprite = mScene.getRenderObjectPool().newStillSprite(); mStillSprite.setTrigger(true); mStillSprite.playAnimation(animation_name); mStillSprite.onTriggerEnter += OnTriggerEnter; #if UNITY_EDITOR mStillSprite.gameObject.name = "TkSpriteBullet_" + animation_name; #endif mBoxY = mStillSprite.getBoxColliderSize().y; }
//------------------------------------------------------------------------- public void setTrigger(bool isTrigger, float size = 1) { mStillSprite.setTrigger(isTrigger, size); }