forked from RiceField-Plugins/RFGarage
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlayerComponent.cs
More file actions
29 lines (25 loc) · 752 Bytes
/
Copy pathPlayerComponent.cs
File metadata and controls
29 lines (25 loc) · 752 Bytes
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
#if RELEASEPUNCH
using System.Collections.Generic;
using Rocket.Unturned.Player;
using UnityEngine;
namespace RFGarage
{
public class PlayerComponent : UnturnedPlayerComponent
{
internal Coroutine ResetPunchCor { get; set; }
internal uint PunchCount { get; set; }
private IEnumerator<WaitForSeconds> ResetPunchCountEnumerator()
{
yield return new WaitForSeconds(60f);
PunchCount = 0;
ResetPunchCor = null;
}
internal void ResetPunchCount()
{
if (ResetPunchCor != null)
Plugin.Inst.StopCoroutine(ResetPunchCor);
ResetPunchCor = Plugin.Inst.StartCoroutine(ResetPunchCountEnumerator());
}
}
}
#endif