Ejemplo n.º 1
0
        protected override bool Trigger()
        {
            base.Trigger();
            DCurve d = ReadCfgCurve.GetDataById(CurveID);

            if (d != null)
            {
                this.Curve = ECurve.Get(d.Path);
            }
            return(this.Curve != null);
        }
Ejemplo n.º 2
0
        public AnimationCurve GetCurve(int id)
        {
            DCurve db = null;

            if (id > 0)
            {
                db = ReadCfgCurve.GetDataById(id);
            }
            if (db != null)
            {
                return(ECurve.Get(db.Path));
            }
            return(null);
        }
Ejemplo n.º 3
0
    static public AnimationCurve Get(string path)
    {
        AnimationCurve curve = null;

        mCurves.TryGetValue(path, out curve);
        if (curve == null)
        {
            GameObject go = GTResourceManager.Instance.Load <GameObject>(path);
            if (go.GetComponent <ECurve>())
            {
                ECurve cur = go.GetComponent <ECurve>();
                curve = cur.curve;
                mCurves.Add(path, curve);
            }
        }
        return(curve);
    }