public override void UseOn(LivingCharacter character) { if (this.canDmg) { int currentHealth = character.GetHealth(); currentHealth += this.GetHealthDelta(); character.SetHealth(currentHealth); this.canDmg = false; } }
public NPCAI(string aType, LivingCharacter aCharacter, SceneNPC aSceneNPC, NPCMover aMover, NPCAttacker anAttacker) { Config = FPPGame.FPPGameModuleManager.Instance.FindEnemyData(aType); _character = aCharacter; _thinkingTimer = 0; _bodyStayTimer = 0; _firstUpdate = true; _sceneNPC = aSceneNPC; _attacker = anAttacker; _mover = aMover; try { CurrentAttidude = (Attidude)Enum.Parse(typeof(Attidude), (string)Config["baseAttidude"]); } catch (Exception) { CurrentAttidude = Attidude.Neutral; } }