private void OnEndInteract(Character_Base character, bool success) { CharacterState_Base CState = character.GetComponent <CharacterState_Base>(); if (success) { foreach (ChangeStateValueInfo info in SuccessChangeValues) { switch (info.valueType) { case StateValueType.Stamina: CState.AIStamina += info.amount; break; } } } else { foreach (ChangeStateValueInfo info in FailChangeValues) { switch (info.valueType) { case StateValueType.Stamina: CState.AIStamina += info.amount; break; } } } }
public override void ActionStart(AI_Mission_Base mission, AI_Base brain, Character_Base character) { base.ActionStart(mission, brain, character); agent = character.GetComponent<NavMeshAgent>(); agent.CalculatePath(TargetPosition, path); }
private void OnTriggerEnter(Collider other) { Character_Base character = other.GetComponent <Character_Base>(); if (character) { if (character.CState.Camp == camp) { AllyCharacters.Add(character); AIBrains.Add(character.GetComponent <AI_Base>()); } else { EnemyCharacters.Add(character); } return; } InteractItem_Base item = other.GetComponentInParent <InteractItem_Base>(); if (item && !AllItems.Contains(item)) { AllItems.Add(item); } }