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

namespace MPStudio
{
    public class HeartJump : MonoBehaviour
    {
        public float animalCost = 0.5f;
        private float timer = 0;
        public float startScale = 1.3f;

         public float jump_cd = 2;
        private void OnEnable()
        {
            TweenManager.Inst.GrowScale(transform,animalCost,this.startScale,1f,null);
        }

        private void Update()
        {
            timer+=Time.deltaTime;

            //cd动态该改变毫无bug可言
            if (timer >= jump_cd)
            {
                this.gameObject.SetActive(false);
                this.gameObject.SetActive(true);
                
                timer = 0;
            }
        }
    }
}