123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- using Common.Combat.FxAILogic;
- using Core.Triiger;
- using GameLogic.Combat.CombatTool;
- using GameLogic.Combat.Hero;
- using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
- using UnityEngine;
- namespace GameLogic.Combat.Skill.MagicSkill
- {
- /// <summary>
- /// 玄龟盾:前方形成一个土系防御盾,抵挡敌人伤害
- /// </summary>
- public class S901003 : MagicSkillBasic, ITriggerEntity, IBarrier
- {
- public string tag { get; }
- private IUnRegister _unRegister;
- private bool _use;
- private long _currHp;
- protected GameObject pengZhuang;
- // protected bool
- protected override void ProMagicUseSkill()
- {
- Own = CombatMagicWeaponEntity.RootMagicWeaponControl.combatHeroEntity;
- if (pengZhuang == null)
- {
- pengZhuang = new GameObject("pengzhaung");
- SphereCollider sphereCollider = pengZhuang.AddComponent<SphereCollider>();
- sphereCollider.isTrigger = true;
- sphereCollider.radius = 2.5f;
- }
- pengZhuang.SetActive(true);
- BarrierEntityMono barrierEntityMono =
- pengZhuang.GetOrAddComponent<BarrierEntityMono>();
- pengZhuang.transform.position = CombatMagicWeaponEntity.RootMagicWeaponControl.combatHeroEntity.dotPos;
- pengZhuang.transform.SetParent(CombatMagicWeaponEntity.RootMagicWeaponControl.combatHeroEntity.GameObject
- .transform);
- barrierEntityMono.Barrier = this;
- _use = true;
- _currHp = (long)SelfSkillConfig.effectValue[0];
- SkillPlayFinish();
- }
- public ShowBaiscEntity Own { get; set; }
- public bool CollideTriiger(ITriggerEntity triggerEntity)
- {
- return !_use || _currHp <= 0;
- }
- protected override void ProDispose()
- {
- if (pengZhuang != null)
- {
- pengZhuang.SetActive(false);
- pengZhuang = null;
- }
- }
- public void Harm(HarmReturnInfo harmReturnInfo)
- {
- _currHp -= harmReturnInfo.att;
- if (_currHp <= 0) //盾破
- {
- pengZhuang.SetActive(false);
- Debug.Log("盾破了,做表现的时候一起做");
- }
- }
- }
- }
|