{
  "format_version": "1.10.0",
  "animation_controllers": {
    "controller.animation.silverlabs_nat.mole.main": {
      "initial_state": "default",
      "states": {
        "default": {
          "animations": [
            {
              "idle_event": "math.random_integer(0, 2000) == 0 && !v.is_rolled_up"
            },
            "idle"
          ],
          "transitions": [{ "roll_up": "v.is_rolled_up" }],
          "blend_transition": 0.2
        },
        "roll_up": {
          "animations": ["dig_down"],
          "transitions": [
            {
              "rolled_up": "v.is_rolled_up && q.all_animations_finished"
            },
            {
              "unroll": "!v.is_rolled_up && q.all_animations_finished"
            }
          ],
          "blend_transition": 0.2
        },
        "rolled_up": {
          "animations": ["underground_transform"],
          "transitions": [
            { "peek": "v.is_rolled_up && v.is_peeking" },
            { "unroll": "!v.is_rolled_up || v.is_unrolling" }
          ],
          "blend_transition": 0.2
        },
        "peek": {
          "animations": ["peek"],
          "transitions": [
            {
              "rolled_up": "v.is_rolled_up && !v.is_peeking && q.all_animations_finished"
            },
            {
              "unroll": "(!v.is_rolled_up || v.is_unrolling) && q.all_animations_finished"
            }
          ],
          "blend_transition": 0.2
        },
        "unroll": {
          "animations": ["dig_up"],
          "transitions": [
            { "rolled_up": "v.is_rolled_up && !v.is_unrolling" },
            {
              "default": "!v.is_rolled_up && q.all_animations_finished"
            }
          ],
          "blend_transition": 0.2
        }
      }
    }
  }
}
