Example #1
0
 public EmoteManager(ServerKnightsManager serverKnightsManager)
 {
     _serverKnightsManager          = serverKnightsManager;
     InputManager.OnDeviceAttached += inputDevice => Logger.Info(this, "Attached: " + inputDevice.Name);
     emoteTex      = new Dictionary <string, Sprite>();
     emoteNames[0] = "empty";
     loadEmotes();
     ensureChooser();
     populatePool();
     Keys = ServerKnightsManager.loadKeyBindings <emoteKeys>("bindings.json");
 }
Example #2
0
        public SkinManager(ServerKnightsManager serverKnightsManager)
        {
            _serverKnightsManager = serverKnightsManager;
            switch (SystemInfo.operatingSystemFamily)
            {
            case OperatingSystemFamily.MacOSX:
                DATA_DIR = Path.GetFullPath(Application.dataPath + "/Resources/Data/Managed/Mods/ServerKnights");
                break;

            default:
                DATA_DIR = Path.GetFullPath(Application.dataPath + "/Managed/Mods/ServerKnights");
                break;
            }
            serverJsonPath  = DATA_DIR + "/server.json";
            sessionJsonPath = DATA_DIR + "/session.json";
            ServicePointManager.ServerCertificateValidationCallback += (o, certificate, chain, errors) => true;
            Keys = ServerKnightsManager.loadKeyBindings <skinKeys>("bindings.json");
        }