{
  "format_version": "1.10.0",
  "animation_controllers": {
    "controller.animation.silverlabs_nat.kangaroo": {
      "initial_state": "idle",
      "states": {
        "idle": {
          "animations": [
            "idle",
            { "pouch": "q.has_rider" }
          ],

          "transitions": [
            { "walk": "q.is_on_ground && v.is_walking && !v.is_sprinting" },
            { "run": "q.is_on_ground && v.is_sprinting && !v.is_walking" },
            { "sit": "q.is_sitting" }
          ],

          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        },
        "sit": {
          "animations": ["baby_sit"],
          "transitions": [
            { "sit_idle": "q.all_animations_finished" }
          ],
          "blend_transition": 0.2
        },
        "sit_idle": {
          "animations": ["baby_sit_idle"],
          "transitions": [
            { "unsit": "!q.is_sitting" }
          ],
          "blend_transition": 0.2
        },
        "unsit": {
          "animations": ["baby_unsit"],
          "transitions": [
            { "idle": "!q.is_sitting" }
          ],
          "blend_transition": 0.2
        },
        "walk": {
          "animations": [
            "walk",
            { "pouch": "q.has_rider" }
          ],

          "transitions": [
            { "idle": "q.is_on_ground && !v.is_walking && !v.is_sprinting" },
            { "run": "q.is_on_ground && v.is_sprinting && !v.is_walking" }
          ],

          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        },

        "run": {
          "animations": [
            "run",
            { "pouch": "q.has_rider" }
          ],

          "transitions": [
            { "idle": "q.is_on_ground && !v.is_walking && !v.is_sprinting" },
            { "walk": "q.is_on_ground && v.is_walking && !v.is_sprinting" }
          ],

          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        }
      }
    },

    "controller.animation.silverlabs_nat.kangaroo.baby_main": {
      "initial_state": "default",
      "states": {
        "default": {
          "animations": ["baby_idle"],
          "transitions": [
            { "sit": "q.is_sitting" },
            { "walk": "q.is_on_ground && v.is_walking && !v.is_sprinting" },
            { "run": "q.is_on_ground && v.is_sprinting" }
          ],
          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        },
        "walk": {
          "animations": ["baby_walk"],
          "transitions": [
            { "sit": "q.is_sitting" },
            { "default": "q.is_on_ground && !v.is_walking && !v.is_sprinting" },
            { "run": "q.is_on_ground && v.is_sprinting" }
          ],
          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        },
        "run": {
          "animations": ["baby_run"],
          "transitions": [
            { "sit": "q.is_sitting" },
            { "default": "q.is_on_ground && !v.is_walking && !v.is_sprinting" },
            { "walk": "q.is_on_ground && v.is_walking && !v.is_sprinting" }
          ],
          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        },
        "sit": {
          "animations": ["baby_sit"],
          "transitions": [
            { "sit_idle": "q.is_sitting && q.all_animations_finished" },
            { "unsit": "!q.is_sitting" }
          ],
          "blend_transition": 0.2
        },
        "sit_idle": {
          "animations": ["baby_sit_idle"],
          "transitions": [
            { "unsit": "!q.is_sitting" }
          ],
          "blend_transition": 0.2
        },
        "unsit": {
          "animations": ["baby_unsit"],
          "transitions": [
            { "sit": "q.is_sitting" },
            { "default": "!q.is_sitting && q.all_animations_finished" }
          ],
          "blend_transition": 0.2
        }
      }
    },

    "controller.animation.silverlabs_nat.kangaroo_punch": {
      "initial_state": "default",
      "states": {
        "default": {
          "on_entry": [
            "v.punch_selector = Math.random_integer(0, 1);"
          ],

          "transitions": [
            { "punch_left": "q.is_delayed_attacking && v.punch_selector == 0" },
            { "punch_right": "q.is_delayed_attacking && v.punch_selector == 1" }
          ],

          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        },

        "punch_left": {
          "animations": ["punch_left"],
          "transitions": [
            { "default": "q.all_animations_finished" }
          ],

          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        },

        "punch_right": {
          "animations": ["punch_right"],
          "transitions": [
            { "default": "q.all_animations_finished" }
          ],

          "blend_via_shortest_path": true,
          "blend_transition": 0.2
        }
      }
    },

    "controller.animation.silverlabs_nat.kangaroo_idle_event": {
      "initial_state": "default",
      "states": {
        "default": {
          "on_entry": [
            "v.delay = Math.random_integer(10, 28);",
            "v.current_delay = q.life_time;",
            "v.idle_selector = Math.random_integer(0, 100);"
          ],

          "transitions": [
            {
              "right_ear_flick": "(q.life_time - v.current_delay >= v.delay) && q.modified_move_speed <= 0.1 && q.is_on_ground && v.idle_selector <= 45"
            },
            {
              "left_ear_flick": "(q.life_time - v.current_delay >= v.delay) && q.modified_move_speed <= 0.1 && q.is_on_ground && (v.idle_selector >= 46 && v.idle_selector <= 90)"
            },
            {
              "right_and_left_ear_flick": "(q.life_time - v.current_delay >= v.delay) && q.modified_move_speed <= 0.1 && q.is_on_ground && v.idle_selector >= 91"
            }
          ],

          "blend_transition": 0.2
        },

        "right_ear_flick": {
          "animations": ["right_ear_flick"],
          "transitions": [
            {
              "default": "q.all_animations_finished || q.modified_move_speed > 0.1 || !q.is_on_ground"
            }
          ],

          "blend_transition": 0.2
        },

        "left_ear_flick": {
          "animations": ["left_ear_flick"],
          "transitions": [
            {
              "default": "q.all_animations_finished || q.modified_move_speed > 0.1 || !q.is_on_ground"
            }
          ],

          "blend_transition": 0.2
        },

        "right_and_left_ear_flick": {
          "animations": [
            "left_ear_flick",
            "right_ear_flick"
          ],

          "transitions": [
            {
              "default": "q.all_animations_finished || q.modified_move_speed > 0.1 || !q.is_on_ground"
            }
          ],

          "blend_transition": 0.2
        }
      }
    }
  }
}
