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

public class Pulse : MonoBehaviour
{
    [Header("Settings")]
    [SerializeField] [Range(0, 1)] float m_pulseFactor;
    [SerializeField] [Range(0, 5)] float m_pulseFrequency;
    [SerializeField] [Range(0, 90)] float m_rotateFactor;
    [SerializeField] [Range(0, 5)] float m_rotateFrequency;
    
    // Update is called once per frame
    void Update()
    {
        transform.localScale = Vector3.one + Vector3.one * (0.5f + Mathf.Sin(Time.time * m_pulseFrequency)) * m_pulseFactor;
        transform.localRotation = Quaternion.identity * Quaternion.Euler(0, 0, (0.5f + Mathf.Sin(Time.time * m_rotateFrequency)) * m_rotateFactor);
    }
}
