private void Start() { //m_Ease = m_EaseSpring; m_Texture = new UCL_EaseTexture(m_TextureSize); //m_Texture.SetEase(m_Ease); }
[Core.ATTR.UCL_DrawTexture2D]//(128, 128, TextureFormat.ARGB32, typeof(UCL_EaseTexture)) Core.TextureLib.UCL_Texture2D DrawEaseCurve() { if (m_Texture == null) { m_Texture = new UCL_EaseTexture(128, 128, TextureFormat.ARGB32); } if (UCL.Core.EditorLib.EditorApplicationMapper.isPlaying && m_Seq != null) { UCL_EaseTexture.DrawEase(m_CurEase, m_Texture); } else { UCL_EaseTexture.DrawEase(m_Ease, m_Texture); } if (m_Cur != null) { Vector2 pos = m_Cur.GetPos(); var tex = m_Texture as UCL_EaseTexture; if (tex != null) { pos.y -= tex.m_Min; pos.y /= tex.m_Range; //pos.y *= 0.99f; } m_Texture.DrawDot(pos.x, pos.y, Color.red, 2); } return(m_Texture); }
public void DrawEaseCurve(Core.TextureLib.UCL_Texture2D texture) { UCL_EaseTexture.DrawEase(m_Ease, texture); if (m_Cur != null) { Vector2 pos = m_Cur.GetPos(); var tex = texture as UCL_EaseTexture; if (tex != null) { pos.y -= tex.m_Min; pos.y /= tex.m_Range; //pos.y *= 0.99f; } texture.DrawDot(pos.x, pos.y, Color.red, 2); } }
public void DrawEaseCurve(Core.TextureLib.UCL_Texture2D texture) { var ease = EaseCreator.Get(m_Type, m_Dir); if (ease == null) { return; } UCL_EaseTexture tex = texture as UCL_EaseTexture; if (tex == null) { return; } tex.SetEase(ease); }