Пример #1
0
        //---------------------------------------------------------------------
        void _initBaseFishLordMgr(List <JsonPacket> json_packet_list, List <RouteJsonPacket> route_json_packet_list)
        {
            ParticleSystemFactory fish_lord_factory = new ParticleSystemFactory();

            // 发射器工厂
            fish_lord_factory.regGeneratorFactory(new DivergencePointGeneratorFactory());
            fish_lord_factory.regGeneratorFactory(new LineGeneratorFactory());
            fish_lord_factory.regGeneratorFactory(new CircleGeneratorFactory());
            fish_lord_factory.regGeneratorFactory(new IntervalDivergenceGeneratorFactory());
            fish_lord_factory.regGeneratorFactory(new RoundCircleGeneratorFactory());
            fish_lord_factory.regGeneratorFactory(new NormalGeneratorFactory());
            fish_lord_factory.regGeneratorFactory(new RedFishGeneratorFactory());
            fish_lord_factory.regGeneratorFactory(new FixGeneratorFactory());

            // 影响器工厂
            fish_lord_factory.regAffectorFactory(new StopAffectorFactory());
            fish_lord_factory.regAffectorFactory(new StartMoveAffectorFactory());
            fish_lord_factory.regAffectorFactory(new AngleSpeedAffectorFactory());

            mBaseFishLordMgr = new BaseFishLordMgr(new LogicFishFactory(mScene), fish_lord_factory);
            mBaseFishLordMgr.create(json_packet_list, route_json_packet_list);

            mLogicParticleSystemOuter = new LogicParticleSystemOuter();
            mLogicParticleSystemOuter.create(mScene, mBaseFishLordMgr);
        }
Пример #2
0
        //---------------------------------------------------------------------
        public void destroy()
        {
            destroyFsm();

            if (mLogicParticleSystemOuter != null)
            {
                mLogicParticleSystemOuter.destroy();
                mLogicParticleSystemOuter = null;
            }

            if (mBaseFishLordMgr != null)
            {
                mBaseFishLordMgr.destroy();
                mBaseFishLordMgr = null;
            }
        }