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

public class AttackButtonEffect : MonoBehaviour
{
    public Transform Btn;

    private float _time;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        _time += Time.unscaledDeltaTime * 50;
        //0.9 + [0,1] * 0.2 ===> 0.9~1.1
        var p = 0.9f + ((Mathf.Sin(_time) + 1) * 0.5f) * 0.2f;
        Btn.localScale = Vector3.one * p;
    }
}
