Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public abstract class Controller : MonoBehaviour
{
[SerializeField] protected float speed;
protected Animator animatorController;
[HideInInspector] public int currentHand;
[HideInInspector] public int opponentHand;
[HideInInspector] protected ControlStrategy controlType;
[HideInInspector] protected Inputs inputs;
protected bool canMove;
protected bool canSkill;
protected bool myTurn;
public float getSpeed()
{
return speed;
}
public bool isSkillUsing()
{
return !canSkill;
}
public bool isMoving()
{
return !canMove;
}
public bool isMyturn()
{
return !myTurn;
}
public float getBehindBackInput()
{
return inputs.behindBack;
}
public float getCrossOverInput()
{
return inputs.crossOver;
}
public float getStepBackInput()
{
return inputs.stepBack;
}
public float getHorizontalMovementInput()
{
return inputs.horizontalMovement;
}
public float getVerticalMovementInput()
{
return inputs.verticalMovement;
}
public float getStealInput()
{
return inputs.steal;
}
public float getBlockInput()
{
return inputs.block;
}
public abstract void changeTurn();
public void updateMovementLockStates()
{
canMove = canMove == true ? false : true;
canSkill = canSkill == true ? false : true;
}
}
public class Inputs
{
public float behindBack;
public float stepBack;
public float crossOver;
public float horizontalMovement;
public float verticalMovement;
public float steal;
public float block;
public Inputs()
{
behindBack = 0;
stepBack = 0;
crossOver = 0;
horizontalMovement = 0;
verticalMovement = 0;
steal = 0;
block = 0;