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