public void Init(AbilityTypes type, int health) { m_LerpData = new Utils.InterpolationData <float>(AnimationTime); m_MaxHealth = health; switch (type) { case AbilityTypes.Blue: Image_FG.color = Color.blue; break; case AbilityTypes.Green: Image_FG.color = Color.green; break; case AbilityTypes.Red: Image_FG.color = Color.red; break; case AbilityTypes.Violet: Image_FG.color = Color.magenta; break; case AbilityTypes.Yellow: Image_FG.color = Color.yellow; break; default: Image_FG.color = Color.white; break; } }
void Fade(float alpha) { m_FadeImage.enabled = true; m_LerpData = new Utils.InterpolationData <Color>(m_FadeTime); m_LerpData.From = m_FadeImage.color; m_LerpData.To = m_LerpData.From; m_LerpData.To.a = alpha; m_LerpData.Start(); }
public AnimationBehaviour(PostProcessingProfile profile, float totalTime) { //Профиль m_Profile = profile; //Базовые данные об анимации m_LerpData = new Utils.InterpolationData <float>(); m_LerpData.TotalTime = totalTime; }
public VignetteAnimationBehaviour(PostProcessingProfile profile, float totalTime, FinalVignetteCommandBuffer vignette, float innerValue, float outerValue) : base(profile, totalTime) { m_Vignette = vignette; m_VignetteInnerValue = innerValue; m_VignetteOuterValue = outerValue; m_OuterValueLerpData = new Utils.InterpolationData <float>(); m_OuterValueLerpData.TotalTime = totalTime; }
public void Dodge(Vector2 dir) { if (m_DodgeTimeLerpData.IsStarted) { return; } m_DodgeDir = new Vector3(dir.x, 0, dir.y); if (OnDodgeStarted != null) { OnDodgeStarted(); } float dodgeTime = DodgeDist / DodgeSpeed; m_DodgeTimeLerpData = new Utils.InterpolationData <float>(dodgeTime); m_DodgeTimeLerpData.Start(); }
private void Awake() { m_PositionLerpData = new Utils.InterpolationData <Vector3>(AnimationTime); m_RotationLerpData = new Utils.InterpolationData <Quaternion>(); }
void Awake() { m_LerpData = new Utils.InterpolationData <Vector3>(AnimationTime); }