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


C# GameData.getSkill方法代码示例

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


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

示例1: updateData

        /// <summary>
        /// Aktualisiert die Objektrefferenzen, die beim erzeugen des Objektes noch nicht vorhanden waren
        /// </summary>
        public void updateData(GameData data)
        {
            if (updateto_temp != 0)
            {
                updateto = data.getStationType(updateto_temp);
            }

            buildship = new List<ShipClass>();

            string[] split = buildship_temp.Split(new String[] { ", " }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string id in split)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    ShipClass add = data.getShipType(id2);

                    if (add != null)
                        buildship.Add(add);
                }
            }

            /*
            buildtroop = new List<TroopClass>();

            string[] split2 = buildtroop_temp.Split(new String[] { ", " }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string id in split2)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    TroopClass add = data.getTroopType(id2);

                    if (add != null)
                        buildtroop.Add(add);
                }
            }

            */

            need_tech = new List<Tech>();

            string[] split3 = need_tech_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split3)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    need_tech.Add(data.getTech(id2));
                }
            }

            race = new List<Race>();

            string[] split4 = race_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split4)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    race.Add(data.getRace(id2));
                }
            }

            //TODO: Skills, etc.

            skills = new List<Skill>();

            string[] split5 = skills_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split5)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    skills.Add(data.getSkill(id2));
                }
            }

            need = new System.Collections.Hashtable();
            string[] need_split = need_temp.Split(new string[] { ", " }, StringSplitOptions.None);
            string[] need_count = need_count_temp.Split(new String[] { ", " }, StringSplitOptions.None);

            for (int i = 0; i < need_split.Length; i++)
            {
                if ((need_count[i] != "") && (need_split[i] != ""))
                {

                    need.Add(data.getStationType(int.Parse(need_split[i])), int.Parse(need_count[i]));
                }
            }
        }
开发者ID:MRH4287,项目名称:GameShare,代码行数:99,代码来源:StationClass.cs

示例2: updateData

        /// <summary>
        /// Aktualisiert die Objektrefferenzen, die beim erzeugen des Objektes noch nicht vorhanden waren
        /// </summary>
        public void updateData(GameData data)
        {
            need_tech = new List<Tech>();

            string[] split1 = need_tech_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split1)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    need_tech.Add(data.getTech(id2));
                }
            }

            race = new List<Race>();

            string[] split2 = race_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split2)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    race.Add(data.getRace(id2));
                }
            }

            skills = new List<Skill>();

            string[] split3 = skills_temp.Split(new String[] { ", " }, StringSplitOptions.None);
            foreach (string id in split3)
            {
                if (id != "")
                {
                    int id2 = int.Parse(id);

                    skills.Add(data.getSkill(id2));
                }
            }
        }
开发者ID:MRH4287,项目名称:GameShare,代码行数:44,代码来源:ShipClass.cs


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