Example #1
0
        public InputBinding InsertNewBinding(int index, InputBinding source)
        {
            if (m_bindings.Count < MAX_BINDINGS)
            {
                InputBinding binding = InputBinding.Duplicate(source);
                m_bindings.Insert(index, binding);

                return(binding);
            }

            return(null);
        }
Example #2
0
        public void Copy(InputAction source)
        {
            m_name        = source.m_name;
            m_displayName = source.m_displayName;
            m_rebindable  = source.m_rebindable;

            m_bindings.Clear();
            foreach (var binding in source.m_bindings)
            {
                m_bindings.Add(InputBinding.Duplicate(binding));
            }
        }
Example #3
0
        public InputBinding CreateNewBinding(InputBinding source)
        {
            if (m_bindings.Count < MAX_BINDINGS)
            {
                InputBinding binding = InputBinding.Duplicate(source);
                m_bindings.Add(binding);

                return(binding);
            }

            return(null);
        }