• 大小: 29.64MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-06-13
  • 语言: 其他
  • 标签: Unity  SpringGUI  UGUI  

资源简介

本工程是对unity中AnimationCurve组件功能的研究。经过对曲线分析,AnimationCurve组件采用hermite插值算法来模拟曲线。本人参照计算方法中hermite插值算法进行实现,使用SpringGUI插件对UGUI进行扩展。并逐个实现AnimationCurve中的编辑曲线,保存曲线,添加曲线等功能。有兴趣的同僚可以看下。

资源截图

代码片段和文件信息

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Newtonsoft.Json;
using LazerframeWork;

public class DataCenter
{
    private DataCenter() { }
    private static DataCenter instance;
    public static DataCenter GetInstance() { if(instance == null) { instance = new DataCenter(); } return instance; }
    public DictionaryameData>> default_graph_dict { get; } = new DictionaryameData>>()
    {
          {
                “horizontal_line“new ListameData>()
                {
                    new KeyframeData()
                    {
                         x = 0
                         y = 0.5f
                         leftTanget = 0
                         rightTanget = 0
                    }
                    new KeyframeData()
                    {
                        x = 1
                        y = 0.5f
                        leftTanget = 0
                        rightTanget = 0
                    }
                }
            }
            {
                “linerTween“new ListameData>()
                {
                     new KeyframeData()
                    {
                         x = 0
                         y = 0
                          leftTanget = 1
                          rightTanget = 1
                    }
                    new KeyframeData()
                    {
                        x = 1
                        y = 1
                        leftTanget = 1
                        rightTanget = 1
                    }
                }
            }
            {
                “easeInQuad“new ListameData>()
                {
                     new KeyframeData()
                    {
                         x = 0
                         y = 0
                         leftTanget = 0
                         rightTanget = 0
                    }
                    new KeyframeData()
                    {
                        x = 1
                        y = 1
                        leftTanget = 2
                        rightTanget = 2
                    }
                }
            }
            {
                “easeOutQuad“new ListameData>()
                {
                     new KeyframeData()
                    {
                         x = 0
                         y = 0
                         leftTanget = 2
                         rightTanget = 2
                    }
                    new KeyframeData()
                    {
                        x = 1
                        y = 1
                        leftTanget = 0
                        rightTanget = 0
                    }
                }
            }
            {
                “easeInOutQuad“new ListameData>()
                {
                     new Ke

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-02-03 12:20  csdn_curve_upload\
     目录           0  2020-02-03 12:20  csdn_curve_upload\Assets\
     目录           0  2020-02-03 12:20  csdn_curve_upload\Assets\prefab\
     文件         172  2020-01-31 20:13  csdn_curve_upload\Assets\prefab.meta
     目录           0  2020-02-03 12:20  csdn_curve_upload\Assets\prefab\ui\
     文件         172  2020-01-31 20:13  csdn_curve_upload\Assets\prefab\ui.meta
     目录           0  2020-02-03 12:20  csdn_curve_upload\Assets\prefab\ui\graph\
     文件         172  2020-01-31 20:13  csdn_curve_upload\Assets\prefab\ui\graph.meta
     文件      121450  2020-02-02 17:50  csdn_curve_upload\Assets\prefab\ui\graph\HermiteCurve.prefab
     文件         190  2020-01-31 18:16  csdn_curve_upload\Assets\prefab\ui\graph\HermiteCurve.prefab.meta
     目录           0  2020-02-03 12:20  csdn_curve_upload\Assets\Scenes\
     文件         172  2018-11-28 08:37  csdn_curve_upload\Assets\Scenes.meta
     文件       34204  2020-02-02 17:50  csdn_curve_upload\Assets\Scenes\curve.unity
     文件         155  2020-01-30 15:02  csdn_curve_upload\Assets\Scenes\curve.unity.meta
     文件        6757  2018-11-28 08:37  csdn_curve_upload\Assets\Scenes\SampleScene.unity
     文件         155  2018-11-28 08:37  csdn_curve_upload\Assets\Scenes\SampleScene.unity.meta
     目录           0  2020-02-03 12:20  csdn_curve_upload\Assets\scripts\
     文件         172  2020-02-01 17:06  csdn_curve_upload\Assets\scripts.meta
     文件        5186  2020-02-02 17:15  csdn_curve_upload\Assets\scripts\DataCenter.cs
     文件         243  2020-02-02 10:24  csdn_curve_upload\Assets\scripts\DataCenter.cs.meta
     文件         415  2020-02-01 17:16  csdn_curve_upload\Assets\scripts\GameStart.cs
     文件         243  2020-02-01 17:07  csdn_curve_upload\Assets\scripts\GameStart.cs.meta
     目录           0  2020-02-03 12:20  csdn_curve_upload\Assets\Tools\
     文件         172  2020-01-31 20:13  csdn_curve_upload\Assets\Tools.meta
     目录           0  2020-02-03 12:20  csdn_curve_upload\Assets\Tools\dotween\
     文件         172  2019-06-10 21:52  csdn_curve_upload\Assets\Tools\dotween.meta
     文件      155648  2019-06-02 13:04  csdn_curve_upload\Assets\Tools\dotween\DOTween.dll
     文件       59589  2019-06-02 13:04  csdn_curve_upload\Assets\Tools\dotween\DOTween.dll.mdb
     文件         155  2019-06-10 22:00  csdn_curve_upload\Assets\Tools\dotween\DOTween.dll.mdb.meta
     文件         569  2019-06-10 22:00  csdn_curve_upload\Assets\Tools\dotween\DOTween.dll.meta
     文件      202841  2019-06-02 13:03  csdn_curve_upload\Assets\Tools\dotween\DOTween.xml
............此处省略1555个文件信息

评论

共有 条评论