protected override bool Trigger() { base.Trigger(); DCurve d = ReadCfgCurve.GetDataById(CurveID); if (d != null) { this.Curve = ECurve.Get(d.Path); } return(this.Curve != null); }
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); }
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); }