so i done the video and its working fine but i dont understand how its working for example in the index
we assigned in editor index starting from 1 and end in -1
public PlayerAttackingState(PlayerStateMachine stateMachine, int attackIndex) : base(stateMachine)
{
attack = stateMachine.Attacks[attackIndex];
}
we take the attack index and store in attack , but our first attack index is 1 look at 14:23 min
and the last one is -1
so when we switch the state we pass in consturctor -1 and its supposed to be null and attack should be null
stateMachine.SwitchState
(
new PlayerAttackingState
(
stateMachine,
attack.ComboStateIndex
)
);
but its all working fine i dont understand how its working can someone explain to me ?