public BattleObjectFactory(Vector <BattleObject> map, Engine.BattleEngine battleEngine)
 {
     _map             = map;
     _buildingFactory = new BuildingFactory(this, battleEngine);
     _unitFactory     = new UnitFactory(this, battleEngine);
     _bulletFactory   = new BulletFactory(this, battleEngine);
     _spellFactory    = new SpellFactory(this, battleEngine);
     _damageFactory   = new DamageFactory(this, battleEngine);
 }
Ejemplo n.º 2
0
        public UnitMonitor()
        {
            this.allyTeam      = EntityManager9.Owner.Team;
            this.damageFactory = new DamageFactory();
            this.rangeFactory  = new RangeFactory();

            Entity.NetworkPropertyChanged   += this.OnNetworkPropertyChanged;
            Entity.AnimationChanged         += this.OnAnimationChanged;
            ModifierManager.ModifierAdded   += this.OnModifierAdded;
            ModifierManager.ModifierRemoved += this.OnModifierRemoved;
            GameManager.GameEvent           += this.OnGameEvent;
            OrderManager.OrderAdding        += this.OnOrderAdding;

            UpdateManager.CreateUpdate(OnUpdate);
        }
Ejemplo n.º 3
0
        public UnitMonitor()
        {
            this.allyTeam      = EntityManager9.Owner.Team;
            this.damageFactory = new DamageFactory();
            this.rangeFactory  = new RangeFactory();

            Entity.OnInt32PropertyChange  += this.OnInt32PropertyChange;
            Entity.OnAnimationChanged     += this.OnAnimationChanged;
            Unit.OnModifierAdded          += this.OnModifierAdded;
            Unit.OnModifierRemoved        += this.OnModifierRemoved;
            Entity.OnHandlePropertyChange += this.OnHandlePropertyChange;
            Game.OnFireEvent             += this.OnFireEvent;
            Entity.OnBoolPropertyChange  += OnBoolPropertyChange;
            Player.OnExecuteOrder        += OnExecuteOrder;
            Entity.OnInt64PropertyChange += OnInt64PropertyChange;

            Drawing.OnDraw += OnUpdateDraw;
            UpdateManager.Subscribe(OnUpdate);
        }
Ejemplo n.º 4
0
    void Awake()
    {
        PlatformType = PlatformType.Local;
#if (UNITY_ANDROID && !UNITY_EDITOR)
#if ANDROID_OPPO
        PlatformType = PlatformType.OPPO;
#elif ANDROID_UC
        PlatformType = PlatformType.UC;
#elif ANDROID_XIAOMI
        PlatformType = PlatformType.MI;
#elif ANDROID_TENCENT
        PlatformType = PlatformType.Tencent;
#endif
#endif
        TraceUtil.Log(PlatformType);
        Application.targetFrameRate = 60;

        m_instance = this;
        this.m_timedSendPackage = GetComponent <TimedSendPackage>();
        this.m_playerFactory    = GetComponent <PlayerFactory>();
        //this.m_monsterFactory = GetComponent<MonsterFactory>();
        this.m_damageFactory     = GetComponent <DamageFactory>();
        this.m_trapFactory       = GetComponent <TrapFactory>();
        this.m_portalFactory     = GetComponent <PortalFactory>();
        this.m_npcFactory        = GetComponent <NPCFactory>();
        this.m_SenceAudioFactory = GetComponent <SenceAudioFactory>();
        //this.m_bulletFactory = GetComponent<BulletFactory>();
        this.m_actionEffectFactory = GetComponent <ActionEffectFactory>();

        LoginManager.Instance.Init91();
        this.RegisterEventHandler();

        this.m_gameSettings = GetComponent <GameSettings>();

        //打印按钮Id
        TraceUtil.Log(SystemModel.Common, TaskBtnManager.Instance.GetBtnId());
    }