using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public enum Abilities
{
    GoRight,
    GoLeft,
    Jump,
    Punch,
    Crouch
}

public class UnlockAbility : MonoBehaviour
{
    PlayerMovement player;
    public Abilities ability;

    void Start()
    {
        player = GameObject.FindObjectOfType<PlayerMovement>();
    }

    public void Activate()
    {
        switch (ability)
        {
            case Abilities.GoRight: player.canMoveRight = true; break;
            case Abilities.GoLeft: player.canMoveLeft = true; break;
            case Abilities.Jump: player.canJump = true; break;
            case Abilities.Punch: player.canAttack = true; break;
            case Abilities.Crouch: player.canCrouch = true; break;
        }
    }
}
