public ACMovement(MoveType mt, string acName) { t = 0; k = 0.3f; acS = AC.Get(acName, "s"); acX = AC.Get(acName, "x"); acY = AC.Get(acName, "y"); acZ = AC.Get(acName, "z"); switch (mt) { case MoveType.Centripetence: _updateFunc = CentripetenceUpdate; break; case MoveType.Yaw: _updateFunc = YawUpdate; break; case MoveType.Dir: _updateFunc = DirUpdate; break; case MoveType.Position: _updateFunc = PosUpdate; break; default: break; } }
public static AnimationCurve Get(string assetName, string acName) { AnimationCurve ac = null; string key = assetName + acName; if (mCach.TryGetValue(key, out ac)) { return(ac); } GameObject go = ResLoad.get("AC/" + assetName).gameObject(); AC acMono = go.GetComponent <AC> (); for (int i = 0; i < acMono._acs.Count; ++i) { ACItem aci = acMono._acs[i]; key = assetName + aci.name; mCach [key] = aci.ac; } ac = mCach [key]; DestroyObject(go); return(ac); }