public override void OnGUI()
 {
     GUI.contentColor = Color.green;
     try
     {
         DictionaryView <string, CheatCommandGroup> repositories = Singleton <CheatCommandsRepository> .instance.repositories;
         DebugHelper.Assert(repositories != null);
         DictionaryView <string, CheatCommandGroup> .Enumerator enumerator = repositories.GetEnumerator();
         int num  = 0;
         int num2 = 0;
         while (enumerator.MoveNext())
         {
             KeyValuePair <string, CheatCommandGroup> current = enumerator.Current;
             string key = current.get_Key();
             if (num2++ >= this.ParentView.skipCount && base.DrawButton(key, string.Empty))
             {
                 ConsoleViewMobile arg_80_0 = this.ParentView;
                 KeyValuePair <string, CheatCommandGroup> current2 = enumerator.Current;
                 arg_80_0.SelectGroup(current2.get_Value());
                 break;
             }
             GUILayout.Space((float)CommandDisplayBasicState.SpaceHeight);
             num++;
         }
     }
     finally
     {
         GUI.contentColor = Color.white;
     }
 }
Пример #2
0
        public bool IsCurSeason(ulong time)
        {
            DictionaryView <uint, ResRankSeasonConf> rankSeasonDict = GameDataMgr.rankSeasonDict;

            if (rankSeasonDict != null)
            {
                DictionaryView <uint, ResRankSeasonConf> .Enumerator enumerator = rankSeasonDict.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    KeyValuePair <uint, ResRankSeasonConf> current = enumerator.Current;
                    if (current.get_Value().ullStartTime == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_rankCurSeasonStartTime)
                    {
                        KeyValuePair <uint, ResRankSeasonConf> current2 = enumerator.Current;
                        if (current2.get_Value().ullStartTime <= time)
                        {
                            KeyValuePair <uint, ResRankSeasonConf> current3 = enumerator.Current;
                            if (time < current3.get_Value().ullEndTime)
                            {
                                return(true);
                            }
                        }
                    }
                }
            }
            return(false);
        }
Пример #3
0
		public Action PlayAction(DictionaryView<string, GameObject> dictionary)
		{
			Action action = ActionManager.Instance.LoadActionResource(this.actionName);
			if (action == null)
			{
				return null;
			}
			GameObject[] array = (GameObject[])this.targets.Clone();
			using (DictionaryView<string, GameObject>.Enumerator enumerator = dictionary.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					KeyValuePair<string, GameObject> current = enumerator.get_Current();
					int num = -1;
					bool flag = action.TemplateObjectIds.TryGetValue(current.get_Key(), ref num);
					if (flag)
					{
						array[num] = current.get_Value();
					}
				}
			}
			if (Time.frameCount <= this.lastActionFrame + 1)
			{
				return null;
			}
			this.lastAction = ActionManager.Instance.PlayAction(this.actionName, this.autoPlay, this.stopConflictActions, array);
			this.lastActionFrame = Time.frameCount;
			return this.lastAction;
		}
Пример #4
0
 public override void OnGUI()
 {
     GUI.contentColor = Color.green;
     try
     {
         DictionaryView <string, CheatCommandGroup> repositories = Singleton <CheatCommandsRepository> .instance.repositories;
         DebugHelper.Assert(repositories != null);
         DictionaryView <string, CheatCommandGroup> .Enumerator enumerator = repositories.GetEnumerator();
         int num  = 0;
         int num2 = 0;
         while (enumerator.MoveNext())
         {
             KeyValuePair <string, CheatCommandGroup> current = enumerator.Current;
             string key = current.Key;
             if ((num2++ >= base.ParentView.skipCount) && base.DrawButton(key, string.Empty))
             {
                 KeyValuePair <string, CheatCommandGroup> pair2 = enumerator.Current;
                 base.ParentView.SelectGroup(pair2.Value);
                 return;
             }
             GUILayout.Space((float)CommandDisplayBasicState.SpaceHeight);
             num++;
         }
     }
     finally
     {
         GUI.contentColor = Color.white;
     }
 }
Пример #5
0
 private void GetTeamKDA(DictionaryView <uint, PlayerKDA> playerKDAStat)
 {
     if (playerKDAStat != null)
     {
         DictionaryView <uint, PlayerKDA> .Enumerator enumerator = playerKDAStat.GetEnumerator();
         while (enumerator.MoveNext())
         {
             KeyValuePair <uint, PlayerKDA> current = enumerator.Current;
             PlayerKDA kda = current.Value;
             this.GetTeamInfoByPlayerKda(kda);
         }
     }
 }
Пример #6
0
 private void GetTeamKDA(DictionaryView <uint, PlayerKDA> playerKDAStat)
 {
     if (playerKDAStat == null)
     {
         return;
     }
     DictionaryView <uint, PlayerKDA> .Enumerator enumerator = playerKDAStat.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <uint, PlayerKDA> current = enumerator.Current;
         PlayerKDA value = current.get_Value();
         this.GetTeamInfoByPlayerKda(value);
     }
 }
Пример #7
0
        private bool HasValidCommand(DictionaryView <string, ICheatCommand> InCommands)
        {
            var iter = InCommands.GetEnumerator();

            while (iter.MoveNext())
            {
                if (iter.Current.Value.isSupportInEditor)
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #8
0
            private bool ReQuery(Agent pAgent)
            {
                Query query = base.GetNode() as Query;

                if (query != null)
                {
                    List <Query.Descriptor_t> descriptors = query.GetDescriptors();
                    if (descriptors.get_Count() > 0)
                    {
                        DictionaryView <string, BehaviorTree> behaviorTrees = Workspace.GetBehaviorTrees();
                        BehaviorTree behaviorTree = null;
                        float        num          = -1f;
                        using (DictionaryView <string, BehaviorTree> .Enumerator enumerator = behaviorTrees.GetEnumerator())
                        {
                            while (enumerator.MoveNext())
                            {
                                KeyValuePair <string, BehaviorTree> current = enumerator.get_Current();
                                BehaviorTree value   = current.get_Value();
                                string       domains = value.GetDomains();
                                if (string.IsNullOrEmpty(query.m_domain) || (!string.IsNullOrEmpty(domains) && domains.IndexOf(query.m_domain) != -1))
                                {
                                    List <BehaviorTree.Descriptor_t> descriptors2 = value.GetDescriptors();
                                    float num2 = query.ComputeSimilarity(descriptors, descriptors2);
                                    if (num2 > num)
                                    {
                                        num          = num2;
                                        behaviorTree = value;
                                    }
                                }
                            }
                        }
                        if (behaviorTree != null)
                        {
                            pAgent.btreferencetree(behaviorTree.GetName());
                            return(true);
                        }
                    }
                }
                return(false);
            }
Пример #9
0
        private bool HasValidCommand(DictionaryView<string, ICheatCommand> InCommands)
        {
            var iter = InCommands.GetEnumerator();

            while (iter.MoveNext())
            {
                if (iter.Current.Value.isSupportInEditor)
                {
                    return true;
                }
            }

            return false;
        }