65 lines
1.5 KiB
C#
65 lines
1.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DG.Tweening;
|
|
using Invector;
|
|
using Invector.vCharacterController;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
|
|
namespace Beyond
|
|
{
|
|
public class HealAnimator : HealAnimatorBase
|
|
{
|
|
public float m_bendEffectMax = 1f;
|
|
public Color m_targetColor = Color.white;
|
|
public Color m_initialColor = Color.black;
|
|
protected override void Init()
|
|
{
|
|
base.Init();
|
|
if (m_material == null)
|
|
{
|
|
enabled = false;
|
|
return;
|
|
}
|
|
m_bendEffectMax = m_material.GetFloat("_BendEffect");
|
|
m_initialColor = m_material.GetColor("_BaseColor");
|
|
}
|
|
|
|
protected override void Start()
|
|
{
|
|
base.Start();
|
|
}
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
}
|
|
|
|
|
|
|
|
[Button]
|
|
public override void Heal()
|
|
{
|
|
base.Heal();
|
|
m_material.DOFloat(0f, "_BendEffect", m_healTime).SetEase(m_easeType);
|
|
m_material.DOColor(m_targetColor, "_BaseColor", m_healTime);
|
|
|
|
}
|
|
|
|
[Button]
|
|
public override void Unheal()
|
|
{
|
|
base.Unheal();
|
|
m_material.DOFloat(m_bendEffectMax, "_BendEffect", m_healTime);//.SetEase(Ease.InOutElastic);
|
|
m_material.DOColor(m_initialColor, "_BaseColor", m_healTime);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|