Beispiel #1
0
        private void Init()
        {
            _ins = this;

            permission.RegisterPermission(PermissionUse, this);
            permission.RegisterPermission(PermissionAdmin, this);

            if (_config.OldSkins == null)
            {
                return;
            }

            foreach (var kvp in _config.OldSkins)
            {
                var skinItem = Configuration.SkinItem.Find(kvp.Key);
                if (skinItem == null)
                {
                    _config.Skins.Add(new Configuration.SkinItem {
                        Shortname = kvp.Key, Skins = kvp.Value
                    });
                    continue;
                }

                skinItem.Skins.AddRange(kvp.Value);
            }

            _config.OldSkins = null;
            SaveConfig();
        }
Beispiel #2
0
        private void Unload()
        {
            for (var i = 0; i < _controllers.Count; i++)
            {
                _controllers[i].Destroy();
            }

            _ins = null;
        }
Beispiel #3
0
 void Loaded()
 {
     instance = this;
 }