Métodos usados con frecuencia
Métodos usados con frecuencia
Métodos usados con frecuencia
Métodos usados con frecuencia
public void RegisterPlayer(PlayerStateManager player) { Player playerComponent = player.GetComponent <Player>(); foreach (State state in (State[])System.Enum.GetValues(typeof(State))) { player.CallOnStateEnter( state, () => onAnyPlayerStartSubscribers[state](playerComponent)); player.CallOnStateExit( state, () => onAnyPlayerEndSubscribers[state](playerComponent)); player.CallOnAnyStateChange( (State start, State end) => onAnyChangeSubscribers(playerComponent, start, end)); } }