当前位置: 首页>>代码示例>>C#>>正文


C# ArchitectureList.GetGameObject方法代码示例

本文整理汇总了C#中GameObjects.ArchitectureList.GetGameObject方法的典型用法代码示例。如果您正苦于以下问题:C# ArchitectureList.GetGameObject方法的具体用法?C# ArchitectureList.GetGameObject怎么用?C# ArchitectureList.GetGameObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameObjects.ArchitectureList的用法示例。


在下文中一共展示了ArchitectureList.GetGameObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadArchitectureFromString

        public void LoadArchitectureFromString(ArchitectureList archs, string data)
        {
            char[] separator = new char[] { ' ', '\n', '\r' };
            string[] strArray = data.Split(separator, StringSplitOptions.RemoveEmptyEntries);

            this.architecture = new ArchitectureList();
            foreach (string i in strArray)
            {
                this.architecture.Add(archs.GetGameObject(int.Parse(i)) as Architecture);
            }
        }
开发者ID:simon217,项目名称:ZhongHuaSanGuoZhi,代码行数:11,代码来源:Event.cs

示例2: LoadArchitecturesFromString

 public void LoadArchitecturesFromString(ArchitectureList architectures, string dataString)
 {
     char[] separator = new char[] { ' ', '\n', '\r', '\t' };
     string[] strArray = dataString.Split(separator, StringSplitOptions.RemoveEmptyEntries);
     this.Architectures.Clear();
     foreach (string str in strArray)
     {
         Architecture gameObject = architectures.GetGameObject(int.Parse(str)) as Architecture;
         if (gameObject != null)
         {
             this.AddArchitecture(gameObject);
         }
     }
 }
开发者ID:k45399735,项目名称:ZhongHuaSanGuoZhi,代码行数:14,代码来源:Section.cs

示例3: LoadArchitecturesFromString

 public List<string> LoadArchitecturesFromString(ArchitectureList architectures, string dataString)
 {
     List<string> errorMsg = new List<string>();
     char[] separator = new char[] { ' ', '\n', '\r', '\t' };
     string[] strArray = dataString.Split(separator, StringSplitOptions.RemoveEmptyEntries);
     this.Architectures.Clear();
     try
     {
         foreach (string str in strArray)
         {
             Architecture gameObject = architectures.GetGameObject(int.Parse(str)) as Architecture;
             if (gameObject != null)
             {
                 this.AddArchitecture(gameObject);
             }
             else
             {
                 errorMsg.Add("建筑ID" + str + "不存在");
             }
         }
     }
     catch
     {
         errorMsg.Add("建筑列表应为半型空格分隔的建筑ID");
     }
     if (this.ArchitectureCount == 0)
     {
         errorMsg.Add("没有建筑");
     }
     return errorMsg;
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:31,代码来源:Section.cs


注:本文中的GameObjects.ArchitectureList.GetGameObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。