Exemple #1
0
 void Awake()
 {
     Utils.DebugLog        = ClientLog.Instance.PrintError;
     Utils.NoticeCenterMsg = delegate(string noticeStr) { NoticeManager.Instance.ShowInfoPanelCenter(noticeStr, 0, 2f); };
     AllScriptExecuteSettings.CurrentAssembly = Assembly.GetAssembly(typeof(Battle));
     AllSideEffects.CurrentAssembly           = Assembly.GetAssembly(typeof(Battle));
     AllBuffs.CurrentAssembly = Assembly.GetAssembly(typeof(Battle));
     LoadAllBasicXMLFiles.Load(Application.streamingAssetsPath + "/Config/");
 }
Exemple #2
0
 public static void ReloadConfigs()
 {
     Utils.DebugLog = Debug.Log;
     AllScriptExecuteSettings.CurrentAssembly = Assembly.GetAssembly(typeof(Battle));
     AllSideEffects.CurrentAssembly           = Assembly.GetAssembly(typeof(Battle));
     AllBuffs.CurrentAssembly = Assembly.GetAssembly(typeof(Battle));
     LoadAllBasicXMLFiles.Load(Application.streamingAssetsPath + "/Config/");
     Debug.Log("Success Load Configs");
 }
Exemple #3
0
    public void Start()
    {
        Utils.DebugLog = ServerLog.Instance.PrintError;
        AllScriptExecuteSettings.CurrentAssembly = Assembly.GetAssembly(typeof(Battle));
        AllSideEffects.CurrentAssembly           = Assembly.GetAssembly(typeof(Battle));
        AllBuffs.CurrentAssembly = Assembly.GetAssembly(typeof(Battle));
        string configFolderPath_FormalServer = "./MechStorm/ServerBuild/Config/";
        string configFolderPath1_LocalServer = "./Config/";

#if UNITY_EDITOR || UNITY_STANDALONE
        string configFolderPath1_UnityLocalServer = Application.streamingAssetsPath + "/Config/";
#endif
        if (Directory.Exists(configFolderPath_FormalServer))
        {
            LoadAllBasicXMLFiles.Load(configFolderPath_FormalServer);
            ServerLog.Instance.PrintServerStates("Load Config Folder at: " + configFolderPath_FormalServer);
        }
        else if (Directory.Exists(configFolderPath1_LocalServer))
        {
            LoadAllBasicXMLFiles.Load(configFolderPath1_LocalServer);
            ServerLog.Instance.PrintServerStates("Load Config Folder at: " + configFolderPath1_LocalServer);
        }
#if UNITY_EDITOR || UNITY_STANDALONE
        else if (Directory.Exists(configFolderPath1_UnityLocalServer))
        {
            LoadAllBasicXMLFiles.Load(configFolderPath1_UnityLocalServer);
            ServerLog.Instance.PrintServerStates("Load Config Folder at: " + configFolderPath1_UnityLocalServer);
        }
#endif

        //Here to test cards, sideEffects, buffs

        //LanguageManager_Common.GetCurrentLanguage = LanguageDebug;

        //CardInfo_Base ci = AllCards.GetCard(50272);
        //string a = ci.GetCardDescShow();
        //        string text;
        //        using (StreamReader sr = new StreamReader(ServerConsole.ServerRoot + "Config/Cards.xml"))
        //        {
        //            text = sr.ReadToEnd();
        //        }
        //
        //        XmlDocument doc = new XmlDocument();
        //        doc.LoadXml(text);
        //        XmlElement allCards = doc.DocumentElement;
        //        ci.BaseExportToXML(allCards);

        //End

        SGMM = new ServerGameMatchManager();
        OnRestartProtocols();
        OnRestartSideEffects();
        StartSeverSocket();
    }