Ejemplo n.º 1
0
        public void Copy(InputAction source)
        {
            m_name        = source.m_name;
            m_description = source.m_description;

            m_bindings.Clear();
            foreach (var binding in source.m_bindings)
            {
                m_bindings.Add(InputBinding.Duplicate(binding));
            }
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        public static InputAction Duplicate(string name, InputAction source)
        {
            InputAction duplicate = new InputAction();

            duplicate.m_name        = name;
            duplicate.m_description = source.m_description;
            duplicate.m_bindings    = new List <InputBinding>();
            foreach (var binding in source.m_bindings)
            {
                duplicate.m_bindings.Add(InputBinding.Duplicate(binding));
            }

            return(duplicate);
        }