public void SaveSettings(BinaryFormatter bf, FileStream file) { bf.Serialize(file, this.m_ActionsByInputAction.Keys.Count); for (int i = 0; i < this.m_ActionsByInputAction.Keys.Count; i++) { int num = this.m_ActionsByInputAction.Keys.ElementAt(i); InputsManager.InputAction inputAction = (InputsManager.InputAction)num; string graph = inputAction.ToString(); bf.Serialize(file, graph); KeyCode keyCode = this.m_ActionsByInputAction.Values.ElementAt(i).m_KeyCode; string graph2 = keyCode.ToString(); bf.Serialize(file, graph2); } bf.Serialize(file, this.m_ActionsByTriggerAction.Keys.Count); for (int j = 0; j < this.m_ActionsByTriggerAction.Keys.Count; j++) { int num2 = this.m_ActionsByTriggerAction.Keys.ElementAt(j); TriggerAction.TYPE type = (TriggerAction.TYPE)num2; string graph3 = type.ToString(); bf.Serialize(file, graph3); KeyCode keyCode2 = this.m_ActionsByTriggerAction.Values.ElementAt(j).m_KeyCode; string graph4 = keyCode2.ToString(); bf.Serialize(file, graph4); } }
public static string GetText(TriggerAction.TYPE action) { string text; if (!TriggerAction.s_CachedText.TryGetValue((int)action, out text)) { text = "HUD_Trigger_" + action.ToString(); TriggerAction.s_CachedText[(int)action] = text; } return(text); }
public static string GetText(TriggerAction.TYPE action) { return("HUD_Trigger_" + action.ToString()); }