Exemplo n.º 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)
            {
                m_MovementBindings = new List <Binding>();
                foreach (var binding in mapping.Bindings)
                {
                    if (binding.Action != null && (binding.Action as StaticAction.PlayerMove) != null)
                    {
                        m_MovementBindings.Add(binding);
                    }
                }
            }

            m_Mapping = mapping;
        }
Exemplo n.º 2
0
        public MappingSet(int id, string name = null)
        {
            m_ID   = id;
            m_Name = GetSanitizedSetName(id, name);

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