Game.EndFrameBarrier
Assembly:
Assembly-CSharp (Assembly-CSharp.dll) — typical game assembly where Game.Prefabs types are compiled for Cities: Skylines 2 mods.
Namespace:
Game.Prefabs
Type:
public enum AnimationType
Base:
System.Enum
Summary:
This file actually defines the AnimationType enumeration used by prefabs to identify animation states or categories for in-game objects (e.g., vehicles, props, or citizen prefabs). It is located in the Game.Prefabs namespace and enumerates common animation roles that prefab code or animation controllers can use to select or switch animations.
Enum members and typical meanings: - None — No animation / default (no special animation assigned). - Idle — Idle or resting animation (stationary pose, looped). - Move — Movement animation (e.g., walking, driving, generic locomotion). - Start — Starting phase of an animation (ramp-up / entrance). - End — Ending phase of an animation (ramp-down / exit). - Action — A one-off action animation (e.g., perform a task, interact). - LeftMin — A left-direction variant, minimal magnitude (e.g., small left turn/tilt). - LeftMax — A left-direction variant, maximal magnitude (e.g., full left turn/tilt). - RightMin — A right-direction variant, minimal magnitude. - RightMax — A right-direction variant, maximal magnitude.
These values are used as identifiers (not carrying animation data themselves). Game code or mod code reads the enum to decide which animation clip or controller state to apply.
Fields
-
private System.Diagnostics.Stopwatch m_Stopwatch
This field is not present in AnimationType. It appears in the provided template but is not applicable to this enum type. AnimationType only defines named constants. -
private Unity.Jobs.JobHandle <producerHandle>k__BackingField
Not applicable to this enum. The AnimationType enum does not declare fields like JobHandle backing fields.
Properties
public Unity.Jobs.JobHandle producerHandle { get; private set }
Not applicable. AnimationType does not expose properties — it only defines named constant values for animation types.
Constructors
public EndFrameBarrier()
Not applicable. Enums do not define constructors in user code; they are value types derived from System.Enum. The template constructor (EndFrameBarrier) is unrelated to AnimationType.
Methods
protected virtual OnCreate() : System.Void
Not applicable. The AnimationType enum does not declare methods. Any methods manipulating or interpreting the enum values would exist in other classes (animation controllers, prefab components, or helper utilities).
Usage Example
using Game.Prefabs;
public class PrefabAnimationController
{
private AnimationType currentAnim = AnimationType.None;
public void SetAnimation(AnimationType anim)
{
currentAnim = anim;
// Example pseudocode: pick and play an animation clip based on the enum
switch (currentAnim)
{
case AnimationType.Idle:
PlayClip("Idle_Loop");
break;
case AnimationType.Move:
PlayClip("Move_Loop");
break;
case AnimationType.Start:
PlayClip("Start_Transition");
break;
case AnimationType.Action:
PlayClip("PerformAction");
break;
case AnimationType.LeftMin:
case AnimationType.LeftMax:
case AnimationType.RightMin:
case AnimationType.RightMax:
// Choose directional variant based on value
PlayDirectionalClip(currentAnim);
break;
case AnimationType.None:
default:
StopAnimation();
break;
}
}
private void PlayClip(string clipName) { /* integrate with animation system */ }
private void PlayDirectionalClip(AnimationType dir) { /* map to specific clip */ }
private void StopAnimation() { /* stop playing */ }
}
Notes: - Use the enum as a lightweight identifier between prefab code, animation state machines, or serializers. - When adding new animation roles in mods, coordinate names with existing game code to avoid mismatches.