private void OnKillMonster(object sender, GameEventArgs e) { KillMonsterEventArgs ne = e as KillMonsterEventArgs; if (ne == null) { return; } if (!this.m_Monsters.Contains(ne.MonsterEntityId)) { return; } m_Monsters.Remove(ne.MonsterEntityId); //if(m_Monsters.Count<MaxCount) //{ // if (RebornCD > 0) // Invoke("CreateMonster", RebornCD); //} if (m_Monsters.Count == 0) { HolderBarrier pHolder = GameEntry.Level.GetHolder(MapHolderType.Barrier) as HolderBarrier; this.Barrier = pHolder.FindElement(data.UnlockBarrierId); Barrier?.Hide(); if (TriggerResult) { GameEntry.Timer.Register(5, () => { GameEntry.Event.Fire(this, new PassLevelEventArgs()); }); } } }
private void OnKillMonster(object sender, GameEventArgs e) { KillMonsterEventArgs ne = e as KillMonsterEventArgs; if (ne == null) { return; } if (!this.mMonsterGUIDSet.Contains(ne.MonsterEntityId)) { return; } this.mMonsterGUIDSet.Remove(ne.MonsterEntityId); this.CurrKillNum++; this.CurrMonsterNum = mMonsterGUIDSet.Count; if (CurrMonsterNum > 0) { return; } if (CurrIndex >= mWaveSet.Waves.Count) { Exit(); } else { CreateWaveMonsters(mWaveSet.Waves[CurrIndex]); } }
public override void OnDead(DeadCommand ev) { base.OnDead(ev); KillMonsterEventArgs args = ReferencePool.Acquire <KillMonsterEventArgs>().Fill(Id, EntityId); GameEntry.Event.Fire(this, args); }
private void OnKillMonster(object sender, GameEventArgs e) { KillMonsterEventArgs ne = e as KillMonsterEventArgs; DRActorEntity drActorEntity = GameEntry.DataTable.GetDataTable <DRActorEntity>().GetDataRow(ne.MonsterId); if (drActorEntity.KillExp <= 0) { return; } int maxLevle = GameEntry.DataTable.GetDataTable <DRHeroLevel>().Count; if (drActorEntity.KillExp > 0) { TryAddExp(drActorEntity.KillExp); } }