예제 #1
0
        public void Dispose()
        {
            int count = this._buffs.Count;

            for (int i = 0; i < count; i++)
            {
                this._buffs[i].MarkToDestroy();
            }
            this.DestroyBuffs();
            this._gPool.Dispose();
            this._battle = null;
        }
예제 #2
0
 public void OnCreate(CBattle battle, string rid, CEntity castr, CEntity target)
 {
     this.battle = battle;
     this.rid    = rid;
     this._data  = ModelFactory.GetBuffData(Utils.GetIDFromRID(this.rid));
     if (!string.IsNullOrEmpty(this._data.fx))
     {
         this.battle.CreateEffect(this._data.fx, this, castr, target);
     }
     if (!string.IsNullOrEmpty(this._data.snd))
     {
         target.graphic.audioSource.PlayOneShot(this._data.snd, 1f);
     }
 }
        public CBattleEventHandler(CBattle battle)
        {
            this._battle = battle;

            EventCenter.AddListener(SyncEventType.GEN_MAZE, this.HandleGenMaze);
            EventCenter.AddListener(SyncEventType.DESTROY_BATTLE, this.HandleDestroyBattle);
            EventCenter.AddListener(SyncEventType.COUNT_DOWN, this.HandleCountDown);
            EventCenter.AddListener(SyncEventType.WIN, this.HandleWin);
            EventCenter.AddListener(SyncEventType.TERMINUS, this.HandleTerminus);
            EventCenter.AddListener(SyncEventType.ENTITY_CREATED, this.HandleEntityCreate);
            EventCenter.AddListener(SyncEventType.ENTITY_ADDED_TO_BATTLE, this.HandleEntityAddedToBattle);
            EventCenter.AddListener(SyncEventType.ENTITY_REMOVE_FROM_BATTLE, this.HandleEntityRemoveFromBattle);
            EventCenter.AddListener(SyncEventType.ENTITY_STATE_CHANGED, this.HandleEntityStateChanged);
            EventCenter.AddListener(SyncEventType.ENTITY_SYNC_PROPS, this.HandleEntitySyncProps);
            EventCenter.AddListener(SyncEventType.PICK_ITEM, this.HandlePickItem);
            EventCenter.AddListener(SyncEventType.USE_ITEM, this.HandleUseItem);
            EventCenter.AddListener(SyncEventType.BUFF_CREATED, this.HandleBuffCreated);
            EventCenter.AddListener(SyncEventType.BUFF_DESTROIED, this.HandleBuffDestroied);
            EventCenter.AddListener(SyncEventType.DEBUG_DRAW, this.HandleDebugDraw);
        }
예제 #4
0
 public CBuffManager(CBattle battle)
 {
     this._battle = battle;
 }
예제 #5
0
 public FxManager(CBattle battle)
 {
     this._battle = battle;
 }
예제 #6
0
 public CEntityManager(CBattle battle)
 {
     this._battle = battle;
 }