Beispiel #1
0
        //-------------------------------------------------------------------------
        public void create(Color color, uint et_player_rpcid, CRenderFish hit_by_bullet_fish, CRenderScene scene, string animation_name)
        {
            mScene = scene;
            mPlayerId = et_player_rpcid;

            mCSpriteFishNetGroup = new CSpriteFishNetGroup();
            mCSpriteFishNetGroup.create(mScene, color, mPlayerId, animation_name);
            mCSpriteFishNetGroup.setTrigger(true);
            mCSpriteFishNetGroup.setColor(color);
            mCSpriteFishNetGroup.onTriggerEnter += OnTriggerEnter;

            addFishList(hit_by_bullet_fish);
        }
Beispiel #2
0
        //-------------------------------------------------------------------------
        public void create(Color color, uint et_player_rpcid, CRenderFish hit_by_bullet_fish, CRenderScene scene, string animation_name)
        {
            mScene    = scene;
            mPlayerId = et_player_rpcid;

            mCSpriteFishNetGroup = new CSpriteFishNetGroup();
            mCSpriteFishNetGroup.create(mScene, color, mPlayerId, animation_name);
            mCSpriteFishNetGroup.setTrigger(true);
            mCSpriteFishNetGroup.setColor(color);
            mCSpriteFishNetGroup.onTriggerEnter += OnTriggerEnter;

            addFishList(hit_by_bullet_fish);
        }
Beispiel #3
0
        //-------------------------------------------------------------------------
        void OnTriggerEnter(Collider other)
        {
            if (mMaxHitFish <= 0)
            {
                mCSpriteFishNetGroup.setTrigger(false);
                return;
            }
            if ("CSpriteFish" != other.gameObject.tag)
            {
                return;
            }

            FishStillSprite sprite_fish = other.gameObject.GetComponent <FishStillSprite>();
            CRenderFish     render_fish = sprite_fish.getSpriteFish().getRenderFish();

            if (render_fish != null)
            {
                _hitFish(render_fish);
            }
        }