public void Attacked(GameObject attacker, int damage, Defects.Defect defect) { damageShowTime=damageShowTimer; if(activeAbil!=Abilities.AbilityType.shield) { block=false; if(curDefect==null && defect!=null) { receivedDefect=true; curDefect=defect; earnedDefect=true; } receivedDamage+=damage; this.hp-=damage; if(this.hp<=0) this.Die(); } else block=true; }
public void StepEnd() { if(activeAbil==Abilities.AbilityType.none && abilityInReuse) { abilityInReuse=false; } if(activeAbil!=Abilities.AbilityType.none && !abilityInReuse) { prevAbil=activeAbil; abilityInReuse=true; activeAbil=Abilities.AbilityType.none; AbilitySwitched(); } if(defectInUse) { defectInUse=false; earnedDefect=false; curDefect=null; } t=0; if(!abilityInReuse && !earnedDefect) TryChoiceAbil(); }
public void StepEnd() { if(activeAbil==Abilities.AbilityType.none && abilityInReuse) abilityInReuse=false; loadOriginAbilities(); if(activeAbil!=Abilities.AbilityType.none && !abilityInReuse) { prevAbil=activeAbil; abilityInReuse=true; activeAbil=Abilities.AbilityType.none; AbilitySwitched(); } if(defectInUse) { if(curDefect.GetType() == typeof(Defects.DisableTurn)) maxTurnAngle=temp.maxTurnAngle; defectInUse=false; earnedDefect=false; curDefect=null; } t=0; updateAttackPosition(); }