Skip to content
Snippets Groups Projects
ControlStrategy.cs 2.71 KiB
Newer Older
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public interface ControlStrategy
{
    string getHorizontalInput();
    string getVerticalInput();
    KeyCode getStepBackInput();
    KeyCode getBehindBackInput();
    KeyCode getCrossOverInput();
    KeyCode getStealInput();
    KeyCode getBlockInput();
    KeyCode getThrowInput();
}

public class KeyBoardControl : ControlStrategy
{
    public KeyCode getBehindBackInput()
    {
        return KeyCode.K;
    }

    public KeyCode getBlockInput()
    {
        return KeyCode.J;
    }

    public KeyCode getCrossOverInput()
    {
        return KeyCode.J;
    }

    public string getHorizontalInput()
    {
        return "Horizontal";
    }

    public KeyCode getStealInput()
    {
        return KeyCode.K;
    }

    public KeyCode getStepBackInput()
    {
        return KeyCode.L;
    }

    public KeyCode getThrowInput()
    {
        return KeyCode.Space;
    }

    public string getVerticalInput()
    {
        return "Vertical";
    }
}

public class XboxControl : ControlStrategy
{
    public KeyCode getBehindBackInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getBlockInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getCrossOverInput()
    {
        throw new System.NotImplementedException();
    }

    public string getHorizontalInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getStealInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getStepBackInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getThrowInput()
    {
        throw new System.NotImplementedException();
    }

    public string getVerticalInput()
    {
        throw new System.NotImplementedException();
    }
}

public class DualShockControl : ControlStrategy
{
    public KeyCode getBehindBackInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getBlockInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getCrossOverInput()
    {
        throw new System.NotImplementedException();
    }

    public string getHorizontalInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getStealInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getStepBackInput()
    {
        throw new System.NotImplementedException();
    }

    public KeyCode getThrowInput()
    {
        throw new System.NotImplementedException();
    }

    public string getVerticalInput()
    {
        throw new System.NotImplementedException();
    }
}