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

public class PlayerHandController : HandController
{
	public bool getPlayerInput = true;

	[Header("Read only")]
	public bool[] fingersOut = new bool[5];

	protected override void Awake()
	{
		base.Awake();
		fingersOut = new bool[5];
	}

	private void Update()
	{
		if (getPlayerInput)
		{
			fingersOut[0] = !Input.GetButton("Thumb");
			fingersOut[1] = !Input.GetButton("Index");
			fingersOut[2] = !Input.GetButton("Middle");
			fingersOut[3] = !Input.GetButton("Ring");
			fingersOut[4] = !Input.GetButton("Pinky");
			
			SetFingerState(thumbJoints, fingersOut[0]);
			SetFingerState(indexJoints, fingersOut[1]);
			SetFingerState(middleJoints, fingersOut[2]);
			SetFingerState(ringJoints, fingersOut[3]);
			SetFingerState(pinkyJoints, fingersOut[4]);
		}
	}
}