diff options
Diffstat (limited to 'Thronefall_1_57/Decompile/Thronefall/PlayerAttack.cs')
| -rw-r--r-- | Thronefall_1_57/Decompile/Thronefall/PlayerAttack.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Thronefall_1_57/Decompile/Thronefall/PlayerAttack.cs b/Thronefall_1_57/Decompile/Thronefall/PlayerAttack.cs new file mode 100644 index 0000000..3def160 --- /dev/null +++ b/Thronefall_1_57/Decompile/Thronefall/PlayerAttack.cs @@ -0,0 +1,33 @@ +using Rewired; +using UnityEngine; + +public class PlayerAttack : MonoBehaviour +{ + public Hp hpPlayer; + + 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(); + attack.DisableMarkersIfDead(); + ui.SetCurrentCooldownPercentage(attack.CooldownPercentage); + } + } + + public void AssignManualAttack(ManualAttack target) + { + attack = target; + } +} |
