Beispiel #1
0
        /// <summary>
        /// キーコンフィグをロードする
        /// </summary>
        /// <param name="path">ファイル</param>
        static public KeyConfigIO LoadConfig(string path)
        {
            BinaryFormatter serializer = new BinaryFormatter();
            KeyConfigIO     map        = (KeyConfigIO)serializer.Deserialize(IO.GetStream(path));

            return(map);
        }
Beispiel #2
0
 public static void SetConfig(KeyConfigIO keyConfig)
 {
     foreach (var item in keyConfig.InputMappings)
     {
         if (keyConfig.ControllerName == "KeyBoard")
         {
             inputMappings[item.Key] = InputMapping.MergeMapping(keyConfig.InputMappings[item.Key], inputMappings[item.Key]);
         }
         else
         {
             inputMappings[item.Key] = InputMapping.MergeMapping(inputMappings[item.Key], keyConfig.InputMappings[item.Key]);
         }
     }
 }