コード例 #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);
        }
コード例 #2
0
ファイル: MoverBase.cs プロジェクト: zyb2013/GameProject3
        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);
        }
コード例 #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);
    }