Here is a sample character controller for the "Fantasy Runners" game that maps keystrokes to the different character abilities described in the game design document:

java

using UnityEngine;

public class FantasyRunnersCharacterController : MonoBehaviour
{
    // Variables to store references to the character's abilities
    private Rigidbody2D rigidBody;
    private Animator animator;
    private FantasyRunnersCharacterAbility ability;

    // Variables to store the keycodes for each ability
    public KeyCode jumpKey = KeyCode.Space;
    public KeyCode slideKey = KeyCode.S;
    public KeyCode dashKey = KeyCode.D;
    public KeyCode magicKey = KeyCode.M;

    // Start is called before the first frame update
    void Start()
    {
        // Get references to the character's abilities
        rigidBody = GetComponent<Rigidbody2D>();
        animator = GetComponent<Animator>();
        ability = GetComponent<FantasyRunnersCharacterAbility>();
    }

    // Update is called once per frame
    void Update()
    {
        // Check for input and perform the corresponding ability
        if (Input.GetKeyDown(jumpKey))
        {
            ability.Jump();
        }
        else if (Input.GetKeyDown(slideKey))
        {
            ability.Slide();
        }
        else if (Input.GetKeyDown(dashKey))
        {
            ability.Dash();
        }
        else if (Input.GetKeyDown(magicKey))
        {
            ability.UseMagic();
        }
    }
}

This script uses the Update function to check for input from the player and call the appropriate ability from the FantasyRunnersCharacterAbility script. The jumpKey, slideKey, dashKey, and magicKey variables can be adjusted in the Unity editor to match the desired control scheme. The animator variable is used to trigger animations for each ability, while the rigidBody variable is used to apply forces to the character.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence