Пример #1
0
        internal override void Load(InputMap savedMap)
        {
            if (savedMap is AnalogMap == false)
            {
                throw new Exception("AnalogMap attempting to load type other than AnalogMap");
            }

            AnalogMap savedAnalogMap = savedMap as AnalogMap;

            foreach (AnalogBinding saved in savedAnalogMap.AnalogBindings.Values)
            {
                if (AnalogBindings.ContainsKey(saved.Alias))
                {
                    AnalogBinding binding = AnalogBindings[saved.Alias];

                    if (binding.GetType().Equals(saved) == false)
                    {
                        throw new Exception("Error loading Button Bindings: Saved binding is not a same type as default binding");
                    }

                    if (binding is GamePadThumbStickBinding)
                    {
                        GamePadThumbStickBinding gpjb  = binding as GamePadThumbStickBinding;
                        GamePadThumbStickBinding other = saved as GamePadThumbStickBinding;
                    }
                }
            }
        }
Пример #2
0
 public AnalogMap(AnalogMap other)
     : this(other.Alias)
 {
     AnalogBindings = new SortedList <string, AnalogBinding>(other.AnalogBindings);
 }