summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/PlayerAttack.cs
blob: a3f84ef3976786b9cd2fa63a3e7fdcc4c7a9e558 (plain)
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
using Rewired;
using UnityEngine;

public class PlayerAttack : MonoBehaviour
{
	public AttackCooldownAnimation ui;

	private ManualAttack attack;

	private Player input;

	private void Start()
	{
		input = ReInput.players.GetPlayer(0);
	}

	private void Update()
	{
		if ((bool)attack)
		{
			attack.Tick();
			ui.SetCurrentCooldownPercentage(attack.CooldownPercentage);
		}
	}

	public void AssignManualAttack(ManualAttack target)
	{
		attack = target;
	}
}