示例#1
0
        public void UpdateMapping()
        {
            var optionStorage = OpenTibiaUnity.OptionStorage;

            Mapping.Mapping mapping    = null;
            MappingSet      mappingSet = optionStorage.GetMappingSet(optionStorage.GeneralInputSetId);

            if (mappingSet != null)
            {
                if (optionStorage.GeneralInputSetMode == MappingSet.ChatModeOFF)
                {
                    mapping = mappingSet.ChatModeOffMapping;
                }
                else
                {
                    mapping = mappingSet.ChatModeOnMapping;
                }
            }

            if (mapping != null && mapping.Bindings != null)
            {
                _movementBindings = new List <Binding>();
                foreach (var binding in mapping.Bindings)
                {
                    if (binding.Action != null && (binding.Action as StaticAction.PlayerMove) != null)
                    {
                        _movementBindings.Add(binding);
                    }
                }
            }

            _mapping = mapping;
        }
示例#2
0
        internal MappingSet(int id, string name = null)
        {
            m_ID   = id;
            m_Name = GetSanitizedSetName(id, name);

            m_ChatModeOff = new Mapping.Mapping();
            m_ChatModeOn  = new Mapping.Mapping();
        }