Пример #1
0
 public void DisableImmediate()
 {
     if (UIManager.Disable(this))
     {
         OnDisable();
         locale.Unload();
         Active = false;
         OnGUI  = null;
     }
 }
Пример #2
0
 public static void SendLocalizedTextAll(string file, string key, string[] args)
 {
     string[] sendArgs = args ?? new string[0]; if (Localization.Language.SelectedLanguage != Localization.Language.DefaultLanguage)
     {
         Localization.Locale loc = new Localization.Locale("English", file, true, ',');
         loc.Load();
         string content = sendArgs.Length <= 0 ? loc[key] : loc.Format(key, sendArgs);
         FengGameManagerMKII.FGM.BasePV.RPC("Chat", PhotonTargets.NotAnarchy, new object[] { content, string.Empty });
         loc.Unload();
     }
     else
     {
         Localization.Locale loc = Localization.Language.Find(file);
         bool needClose          = false;
         if (!loc.IsOpen)
         {
             loc.Load();
             needClose = true;
         }
         string content = sendArgs.Length <= 0 ? loc[key] : loc.Format(key, sendArgs);
         FengGameManagerMKII.FGM.BasePV.RPC("Chat", PhotonTargets.NotAnarchy, new object[] { content, string.Empty });
         if (needClose)
         {
             loc.Unload();
         }
     }
     FengGameManagerMKII.FGM.BasePV.RPC("ChatLocalized", PhotonTargets.AnarchyUsers, new object[] { file, key, sendArgs });
 }