Class MeleeAttackingState
Melee archetype preset. Closes to weapon reach, never backs away, and occasionally steps into a flanking or orbiting sub-state for variety.
[CreateAssetMenu(fileName = "New AI Melee Attacking State", menuName = "FishMMO/Character/NPC/AI/Melee Attacking State", order = 1)]
public class MeleeAttackingState : BaseAttackingState, ICachedObject
- Inheritance
-
ObjectScriptableObjectMeleeAttackingState
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Remarks
This class carries no behaviour of its own — melee is simply BaseAttackingState with PreferredDistance and MinComfortDistance at zero. It exists so the asset menu still offers a named starting point, and so FishMMO.Shared.MeleeAttackingState.Reset() can seed sensible numbers when a designer creates one.
It previously carried a full TryAttack override that duplicated the base logic and
had drifted from it. Notably its flanking roll called ChangeState on a sub-state
whose target the base Exit then wiped, so every roll ended the fight instead of
varying it; wiring variety through VarietyStates and
KeepsCombatTarget fixes that for every archetype at once.