public List <InterpTimedEvent> EmergencyDump(bool botherSorting)
        {
            bool flag;
            HashSet <InterpTimedEvent> collection = new HashSet <InterpTimedEvent>();
            Iterator iterator = new Iterator();

            do
            {
                InterpTimedEvent event2;
                try
                {
                    flag = this.Dequeue(ulong.MaxValue, out event2, ref iterator);
                }
                catch (Exception exception)
                {
                    Debug.LogException(exception);
                    break;
                }
                if (flag)
                {
                    collection.Add(event2);
                }
            }while (flag);
            this.first = this.last = new InterpTimedEvent.Dir();
            this.count = 0;
            HashSet <InterpTimedEvent> other = this.FAIL_SAFE_SET;

            this.FAIL_SAFE_SET = null;
            if (other != null)
            {
                collection.UnionWith(other);
            }
            List <InterpTimedEvent> list = new List <InterpTimedEvent>(collection);

            if (botherSorting)
            {
                try
                {
                    if (< > f__am$cache4 == null)
                    {
                        < > f__am$cache4 = delegate(InterpTimedEvent x, InterpTimedEvent y) {
                            if (x == null)
                            {
                                if (y == null)
                                {
                                    return(0);
                                }
                                int num = 0;
                                return(num.CompareTo(1));
                            }
                            if (y == null)
                            {
                                int num2 = 1;
                                return(num2.CompareTo(0));
                            }
                            return(x.info.timestampInMillis.CompareTo(y.info.timestampInMillis));
                        };
                    }
                    list.Sort(< > f__am$cache4);
                }
 public void FreeAll()
 {
     if (CacheMultisizeArrayImpl <T> .< > f__am$cache0 == null)
     {
         CacheMultisizeArrayImpl <T> .< > f__am$cache0 = kv => kv.Value.FreeAll();
     }
     this.elementsCountToArrayCache.ForEach <KeyValuePair <int, CacheImpl <T[]> > >(CacheMultisizeArrayImpl <T> .< > f__am$cache0);
 }
Exemple #3
0
 private static void SORT_QUEUE()
 {
     WORK_LATE.list.AddRange(queue);
     try
     {
         if (< > f__am$cache11 == null)
         {
             < > f__am$cache11 = (a, b) => a.importance.CompareTo(b.importance);
         }
    private void FindOldAndNewCards()
    {
        int num = -1;
        List <PowerTask> taskList = base.m_taskList.GetTaskList();

        for (int i = 0; i < taskList.Count; i++)
        {
            Network.PowerHistory power = taskList[i].GetPower();
            switch (power.Type)
            {
            case Network.PowerType.FULL_ENTITY:
            {
                Network.HistFullEntity entity = (Network.HistFullEntity)power;
                Entity entity2 = GameState.Get().GetEntity(entity.Entity.ID);
                if (entity2 != null)
                {
                    Card card = entity2.GetCard();
                    if (card != null)
                    {
                        this.m_newCard = card;
                    }
                }
                break;
            }

            case Network.PowerType.SHOW_ENTITY:
            {
                Network.HistShowEntity entity3 = (Network.HistShowEntity)power;
                Entity entity4 = GameState.Get().GetEntity(entity3.Entity.ID);
                if (entity4 != null)
                {
                    Card card2 = entity4.GetCard();
                    if ((card2 != null) && (entity4.GetZone() == TAG_ZONE.DECK))
                    {
                        if (< > f__am$cache5 == null)
                        {
                            < > f__am$cache5 = delegate(Network.Entity.Tag tag) {
                                if (tag.Name != 0x31)
                                {
                                    return(false);
                                }
                                if (tag.Value != 3)
                                {
                                    return(false);
                                }
                                return(true);
                            };
                        }
                        if (entity3.Entity.Tags.Find(< > f__am$cache5) != null)
                        {
                            this.m_oldCard = card2;
                            num            = i;
                        }
                    }
Exemple #5
0
 private void ReorderTransition(ReorderableList list)
 {
     this.m_LockList = true;
     switch (this.m_Type)
     {
     case UnityEditor.Graphs.AnimationStateMachine.TransitionType.eState:
         Undo.RegisterCompleteObjectUndo(this.m_State, "Reorder transition");
         if (< > f__am$cache1 == null)
         {
             < > f__am$cache1 = t => t.transition as AnimatorStateTransition;
         }
        private static bool ReplaceWithHardcodedAlternativeIfPresent(MethodReference method, CppCodeWriter writer, IRuntimeMetadataAccess metadataAccess)
        {
            MethodDefinition definition = method.Resolve();

            switch (definition.FullName)
            {
            case "System.Int32 System.Double::GetHashCode()":
            {
                TypeDefinition type = definition.Module.GetType("System.Int64");
                if (< > f__am$cache4 == null)
                {
                    < > f__am$cache4 = m => m.Name == "GetHashCode";
                }
Exemple #7
0
 internal void EnsureFullyLoaded()
 {
     if (!this.fullyLoaded)
     {
         if (LazyReadOnlyCollection <T> .< > f__am$cache0 == null)
         {
             LazyReadOnlyCollection <T> .< > f__am$cache0 = delegate(T x) {
             };
         }
         this.ForEach <T>(LazyReadOnlyCollection <T> .< > f__am$cache0);
         this.fullyLoaded = true;
     }
 }
Exemple #8
0
 public void Dispose()
 {
     if (!this.disposed)
     {
         if (AbstractArchive <TEntry, TVolume> .< > f__am$cache1 == null)
         {
             AbstractArchive <TEntry, TVolume> .< > f__am$cache1 = v => v.Dispose();
         }
         this.lazyVolumes.ForEach <TVolume>(AbstractArchive <TEntry, TVolume> .< > f__am$cache1);
         AbstractArchive <TEntry, TVolume> .< > f__am$cache2 ??= x => x.Close();
         this.lazyEntries.GetLoaded().Cast <Entry>().ForEach <Entry>(AbstractArchive <TEntry, TVolume> .< > f__am$cache2);
         this.disposed = true;
     }
 }
        private static string ConfigurationProviderAssembliesPathArgument()
        {
            StringBuilder builder = new StringBuilder();
            IEnumerator <Unity.DataContract.PackageInfo> enumerator = ModuleManager.packageManager.unityExtensions.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    Unity.DataContract.PackageInfo current = enumerator.Current;
                    if (< > f__am$cache2 == null)
                    {
                        < > f__am$cache2 = f => f.Value.type == PackageFileType.Dll;
                    }
Exemple #10
0
 private void OnGUI()
 {
     switch (this.State)
     {
         case States.Connecting:
             if (<>f__am$cache0 == null)
             {
                 <>f__am$cache0 = delegate {
                     GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
                     GUILayout.FlexibleSpace();
                     GUIHelper.DrawCenteredText("Connecting to the server...");
                     GUILayout.FlexibleSpace();
                     GUILayout.EndVertical();
                 };
             }
Exemple #11
0
 public void AntiCheatQuit(string title, string text)
 {
     try
     {
         GeneralDialogContext dialogContext = new GeneralDialogContext {
             type  = GeneralDialogContext.ButtonType.SingleButton,
             title = LocalizationGeneralLogic.GetText(title, new object[0]),
             desc  = LocalizationGeneralLogic.GetText(text, new object[0]),
             notDestroyAfterTouchBG = true,
             hideCloseBtn           = true
         };
         if (< > f__am$cache5 == null)
         {
             < > f__am$cache5 = ok => Quit();
         }
Exemple #12
0
        private void PlayVideo()
        {
            this._pageContext.FadeOutVideo();
            base.transform.Find("Video").gameObject.SetActive(true);
            this._videoPlayer.gameObject.SetActive(true);
            try
            {
                CgDataItem item = Singleton <CGModule> .Instance.GetCgDataItemList()[0];

                string path = string.Format("Video/{0}.mp4", item.cgPath);
                if (this._videoPlayer.OpenVideoFromFile(MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder, path, false))
                {
                    if (< > f__am$cache11 == null)
                    {
                        < > f__am$cache11 = () => Singleton <MainUIManager> .Instance.LockUI(true, float.MaxValue);
                    }
Exemple #13
0
        private void DrawLODLevelSlider(Rect sliderPosition, List <LODGroupGUI.LODInfo> lods)
        {
            int   controlID = GUIUtility.GetControlID(this.m_LODSliderId, FocusType.Passive);
            Event current   = Event.current;

            switch (current.GetTypeForControl(controlID))
            {
            case EventType.MouseDown:
            {
                Rect rect = sliderPosition;
                rect.x     -= 5f;
                rect.width += 10f;
                if (rect.Contains(current.mousePosition))
                {
                    current.Use();
                    GUIUtility.hotControl = controlID;
                    if (< > f__am$cache16 == null)
                    {
                        < > f__am$cache16 = lod => lod.ScreenPercent > 0.5f;
                    }
Exemple #14
0
 public static void Init(string adUnitId, bool showLog = false, AdRequest adRequest = null, int frequency = 1)
 {
     if (_ad != null)
     {
         Debug.LogWarning(typeof(AdManager).Name + " is already inited!");
     }
     else
     {
         try
         {
             _ad = new InterstitialAd(adUnitId);
             if (adRequest == null)
             {
             }
             _request   = new AdRequest.Builder().Build();
             _showLog   = showLog;
             _frequency = frequency;
             _counter   = _frequency - 2;
             if (_frequency < 1)
             {
                 _frequency = 1;
             }
             if (< > f__am$cache8 == null)
             {
                 < > f__am$cache8 = delegate(object sender, EventArgs args) {
                     if (_loadedAction != null)
                     {
                         _loadedAction();
                     }
                     _loadedAction        = null;
                     InterstitialIsLoaded = true;
                     if (_showLog)
                     {
                         Debug.Log(typeof(AdManager).Name + " interstitial is loaded");
                     }
                 };
             }
             _ad.AdLoaded += < > f__am$cache8;
             if (< > f__am$cache9 == null)
             {
        private static IEnumerable <string> BuildExtraTypesList()
        {
            HashSet <string> set = new HashSet <string>();

            if (ExtraTypesOptions.Name != null)
            {
                foreach (string str in ExtraTypesOptions.Name)
                {
                    set.Add(str);
                }
            }
            if (ExtraTypesOptions.File != null)
            {
                foreach (string str2 in ExtraTypesOptions.File)
                {
                    try
                    {
                        if (< > f__am$cache6 == null)
                        {
                            < > f__am$cache6 = l => l.Trim();
                        }
                        if (< > f__am$cache7 == null)
                        {
Exemple #16
0
    private void CheckResult()
    {
        GameTurnTableOneCtrl ctrl = this.mList[0];
        int num = 0;

        for (int i = 1; i < 6; i++)
        {
            GameTurnTableOneCtrl ctrl2 = this.mList[i];
            if (this.GetMinAngle(ctrl2.transform.eulerAngles.z) < this.GetMinAngle(ctrl.transform.eulerAngles.z))
            {
                num  = i;
                ctrl = ctrl2;
            }
        }
        this.resultData = ctrl.mData;
        string skillName    = string.Empty;
        string skillContent = string.Empty;

        switch (this.resultData.type)
        {
        case TurnTableType.ExpBig:
        case TurnTableType.ExpSmall:
            GameLogic.Release.Mode.CreateGoods(GameLogic.Self.position, GameLogic.GetExpList((int)this.resultData.value), 2);
            break;

        case TurnTableType.PlayerSkill:
        {
            int skillid = (int)this.resultData.value;
            GameLogic.Self.LearnExtraSkill(skillid);
            skillName    = GameLogic.Hold.Language.GetSkillName(skillid);
            skillContent = GameLogic.Hold.Language.GetSkillContent(skillid);
            break;
        }

        case TurnTableType.EventSkill:
        {
            int getID = LocalModelManager.Instance.Room_eventgameturn.GetBeanById((int)this.resultData.value).GetID;
            GameLogic.Self.AddSkill(getID, Array.Empty <object>());
            skillName    = GameLogic.Hold.Language.GetSkillName(getID);
            skillContent = GameLogic.Hold.Language.GetSkillContent(getID);
            break;
        }

        case TurnTableType.HPAdd:
        {
            int skillId = (int)this.resultData.value;
            GameLogic.Self.AddSkillAttribute(skillId, Array.Empty <object>());
            skillName    = GameLogic.Hold.Language.GetSkillName(skillId);
            skillContent = GameLogic.Hold.Language.GetSkillContent(skillId);
            break;
        }

        case TurnTableType.Empty:
            skillName    = GameLogic.Hold.Language.GetLanguageByTID("GameTurn_EmptyTitle", Array.Empty <object>());
            skillContent = GameLogic.Hold.Language.GetLanguageByTID("GameTurn_EmptyContent", Array.Empty <object>());
            break;

        case TurnTableType.Gold:
        {
            long allcount = (long)this.resultData.value;
            skillName = GameLogic.Hold.Language.GetLanguageByTID("GameTurn_GoldTitle", Array.Empty <object>());
            object[] args = new object[] { allcount };
            skillContent = GameLogic.Hold.Language.GetLanguageByTID("GameTurn_GoldContent", args);
            if (allcount > 0L)
            {
                IMediator mediator = Facade.Instance.RetrieveMediator("BattleModuleMediator");
                if (mediator != null)
                {
                    object obj2 = mediator.GetEvent("Event_GetGoldPosition");
                    if ((obj2 == null) || !(obj2 is Vector3))
                    {
                        GameLogic.Hold.BattleData.AddGold((float)allcount);
                        break;
                    }
                    Vector3 endpos = (Vector3)obj2;
                    if (< > f__am$cache0 == null)
                    {
                        < > f__am$cache0 = onecount => GameLogic.Hold.BattleData.AddGold((float)onecount);
                    }