public void OnDead() { SkillSlot slot = null; for (int i = 0; i < 8; i++) { slot = this.SkillSlotArray[i]; if (((slot != null) && (slot.skillChangeEvent != null)) && slot.skillChangeEvent.IsActive()) { slot.skillChangeEvent.Abort(); } } if (this.CurUseSkill != null) { this.CurUseSkill.Stop(); } for (int j = 0; j < this.SpawnedBullets.Count; j++) { BulletSkill skill = this.SpawnedBullets[j]; if (skill.IsDeadRemove) { skill.Stop(); skill.Release(); this.SpawnedBullets.RemoveAt(j); j--; } } }
public override void UpdateLogic(int nDelta) { if (this.CurUseSkill != null && this.CurUseSkill.isFinish) { this.CurUseSkill = null; this.CurUseSkillSlot = null; } for (int i = 0; i < this.SpawnedBullets.Count; i++) { BulletSkill bulletSkill = this.SpawnedBullets[i]; if (bulletSkill != null) { bulletSkill.UpdateLogic(nDelta); if (bulletSkill.isFinish) { bulletSkill.Release(); this.SpawnedBullets.RemoveAt(i); } } } for (int j = 0; j < 10; j++) { SkillSlot skillSlot = this.SkillSlotArray[j]; if (skillSlot != null) { skillSlot.UpdateLogic(nDelta); } } if (this.talentSystem != null) { this.talentSystem.UpdateLogic(nDelta); } }
public void OnDead() { for (int i = 0; i < 10; i++) { SkillSlot skillSlot = this.SkillSlotArray[i]; if (skillSlot != null && skillSlot.skillChangeEvent != null && skillSlot.skillChangeEvent.IsActive()) { skillSlot.skillChangeEvent.Abort(); } } if (this.CurUseSkill != null) { this.CurUseSkill.Stop(); } for (int j = 0; j < this.SpawnedBullets.get_Count(); j++) { BulletSkill bulletSkill = this.SpawnedBullets.get_Item(j); if (bulletSkill.IsDeadRemove) { bulletSkill.Stop(); bulletSkill.Release(); this.SpawnedBullets.RemoveAt(j); j--; } } }
public PoolObjHandle <BulletSkill> SpawnBullet(SkillUseContext context, string _actionName, bool _bDeadRemove) { PoolObjHandle <BulletSkill> handle = new PoolObjHandle <BulletSkill>(); if (context != null) { BulletSkill item = ClassObjPool <BulletSkill> .Get(); item.Init(_actionName, _bDeadRemove); if (item.Use(base.actorPtr, context.Clone())) { this.SpawnedBullets.Add(item); return(new PoolObjHandle <BulletSkill>(item)); } item.Release(); } return(handle); }
public void OnDead() { if (this.CurUseSkill != null) { this.CurUseSkill.Stop(); } for (int i = 0; i < this.SpawnedBullets.Count; i++) { BulletSkill skill = this.SpawnedBullets[i]; if (skill.IsDeadRemove) { skill.Stop(); skill.Release(); this.SpawnedBullets.RemoveAt(i); i--; } } }
public PoolObjHandle <BulletSkill> SpawnBullet(SkillUseContext context, string _actionName, bool _bDeadRemove, bool _bAgeImmeExcute = false, int _bulletTypeId = 0, int _bulletUpperLimit = 0) { PoolObjHandle <BulletSkill> result = default(PoolObjHandle <BulletSkill>); if (context == null) { return(result); } BulletSkill bulletSkill = ClassObjPool <BulletSkill> .Get(); bulletSkill.Init(_actionName, _bDeadRemove, _bulletTypeId); bulletSkill.bAgeImmeExcute = _bAgeImmeExcute; this.RecycleOverLimitBullte(_bulletTypeId, _bulletUpperLimit); if (bulletSkill.Use(this.actorPtr, context)) { this.SpawnedBullets.Add(bulletSkill); result = new PoolObjHandle <BulletSkill>(bulletSkill); } else { bulletSkill.Release(); } return(result); }