// *********************************************************************** // Assembly : Game // Author : Kimch // Created : 2020-09-02 // Description : // Last Modified By : // Last Modified On : // *********************************************************************** // // // *********************************************************************** using UnityEngine; namespace G { public class RepeatDamage : MonoBehaviour { public float startdelay = 0.5f; public float repeatdelay = 0.2f; private Collider _collider; private void Awake() { _collider = this.GetComponent(); } private void OnEnable() { InvokeRepeating(nameof(ColliderClick), startdelay, repeatdelay); } public void DamageCancel() { CancelInvoke(); } public void ColliderClick() { _collider.enabled = true; } } }