예제 #1
0
 //-------------------------------------------------------------------------
 void _setTrigger(bool isTrigger)
 {
     mTurretBaseSprite.setTrigger(isTrigger);
     mTurretTopSprite.setTrigger(isTrigger);
     //mTurretBlazeSprite.setTrigger(isTrigger);
     mTurretBarrelSprite.setTrigger(isTrigger);
 }
예제 #2
0
        //-------------------------------------------------------------------------
        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;
        }
예제 #3
0
        //-------------------------------------------------------------------------
        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;
        }
예제 #4
0
 //-------------------------------------------------------------------------
 public void setTrigger(bool isTrigger, float size = 1)
 {
     mStillSprite.setTrigger(isTrigger, size);
 }