Animation Controller - Team-Swamp/IceBites GitHub Wiki

Overview

The animation controller is a simple script that controls the animations of either the player or the NPC. This works by creating triggers that will decide wether an animation gets played.

Written by - William

Usage

Flowchart

---
title: Animation Controller
---
graph TD;
    A[Start] --> B{Animator Assigned?};
    B -->|Yes| C[Play Animation];
    B -->|No| D(Error: No Animator Assigned);
    C --> E{Valid Animation?};
    E -->|Yes| F(Set Trigger);
    E -->|No| G(Error: Invalid Animation);

Animation Controller

The script requires a component of the type Animator. Otherwise it will not function.

Methods Return Description
+ PlayAnimation(string animation) void Play's an animation by activating the trigger given as a string
- IsValidAnimation(string animationName) bool Checks if the animation trigger exists.

Source

If u wish to take a closer look at the script Animation Controller.