Below is from ChatGPT

1️⃣ out

  • Not exactly “outside the method”, but close.

  • out is a keyword that tells the method:

    “I want you to assign a value to this variable inside the method, and then I’ll use it afterward.”

  • The variable must be assigned by the method before it’s used.

  • It’s a way to return an extra value from a method (since a method normally can only return one thing).

Example:

int result; 
bool success = int.TryParse("123", out result); 
// result is assigned inside TryParse

2️⃣ var

  • var just tells the compiler:

    “Figure out the type of this variable automatically from the assigned value.”

  • In our case, config will automatically be AnimationStateConfig because stateConfigs is a Dictionary<Attacks, AnimationStateConfig>.


3️⃣ config

  • This is the variable name that receives the value from the dictionary.

  • Its type is AnimationStateConfig.

  • After the TryGetValue call, config contains the AnimationStateConfig instance corresponding to the current attack state.