public void AddTranslationValue(string id, float time, double value) { if (TranslationKeys == null) { TranslationKeys = new Dictionary <float, float3>(); } float3 tmp = new float3(); if (TranslationKeys.TryGetValue(time, out tmp)) { if (id == "x") { tmp.x = (float)value; } if (id == "y") { tmp.y = (float)value; } if (id == "z") { tmp.z = (float)value; } TranslationKeys[time] = tmp; } else { if (id == "x") { tmp = new float3((float)value, 0, 0); } if (id == "y") { tmp = new float3(0, (float)value, 0); } if (id == "z") { tmp = new float3(0, 0, (float)value); } TranslationKeys.Add(time, tmp); } }
public static string GetString(this ResourceManager rm, TranslationKeys key) { return(rm.GetString(key.ToString())); }