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


C# Identity.ToString方法代码示例

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


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

示例1: PooledObject

 /// <summary>
 /// </summary>
 /// <param name="pooledIn">
 /// </param>
 /// <param name="parent">
 /// </param>
 /// <param name="id">
 /// </param>
 public PooledObject(Identity parent, Identity id)
 {
     this.Identity = id;
     this.Parent = parent;
     Pool.Instance.AddObject(parent, this);
     LogUtil.Debug(
         DebugInfoDetail.Pool,
         "Created new object " + id.ToString(true) + " of " + parent.ToString(true));
 }
开发者ID:gordonc64,项目名称:CellAO-NightPredator,代码行数:17,代码来源:PooledObject.cs

示例2: InstantiateMobSpawn

        public static ICharacter InstantiateMobSpawn(
            DBMobSpawn mob,
            DBMobSpawnStat[] stats,
            IController npccontroller,
            IPlayfield playfield)
        {
            if (playfield != null)
            {
                Identity mobId = new Identity() { Type = IdentityType.CanbeAffected, Instance = mob.Id };
                if (Pool.Instance.GetObject(playfield.Identity, mobId) != null)
                {
                    throw new Exception("Object " + mobId.ToString(true) + " already exists!!");
                }
                Character cmob = new Character(playfield.Identity, mobId, npccontroller);
                cmob.Read();
                cmob.Playfield = playfield;
                cmob.Coordinates(new Coordinate() { x = mob.X, y = mob.Y, z = mob.Z });
                cmob.RawHeading = new Quaternion(mob.HeadingX, mob.HeadingY, mob.HeadingZ, mob.HeadingW);
                cmob.Name = mob.Name;
                cmob.FirstName = "";
                cmob.LastName = "";
                foreach (DBMobSpawnStat stat in stats)
                {
                    cmob.Stats.SetBaseValueWithoutTriggering(stat.Stat, (uint)stat.Value);
                }

                cmob.Stats.SetBaseValueWithoutTriggering((int)StatIds.visualprofession, cmob.Stats[StatIds.profession].BaseValue);
                // initiate affected stats calculation
                int temp = cmob.Stats[StatIds.level].Value;
                temp = cmob.Stats[StatIds.agility].Value;
                temp = cmob.Stats[StatIds.headmesh].Value;
                cmob.MeshLayer.AddMesh(0, cmob.Stats[StatIds.headmesh].Value, 0, 4);
                cmob.SocialMeshLayer.AddMesh(0, cmob.Stats[StatIds.headmesh].Value, 0, 4);
                List<MobSpawnWaypoint> waypoints =
                    MessagePackZip.DeserializeData<MobSpawnWaypoint>(mob.Waypoints.ToArray());
                foreach (MobSpawnWaypoint wp in waypoints)
                {
                    Waypoint mobwp = new Waypoint();
                    mobwp.Position.x = wp.X;
                    mobwp.Position.y = wp.Y;
                    mobwp.Position.z = wp.Z;
                    mobwp.Running = wp.WalkMode == 1;
                    cmob.Waypoints.Add(mobwp);
                }
                npccontroller.Character = cmob;
                if (cmob.Waypoints.Count > 2)
                {
                    cmob.Controller.State = CharacterState.Patrolling;
                }
                cmob.DoNotDoTimers = false;
                return cmob;
            }
            return null;
        }
开发者ID:gordonc64,项目名称:CellAO-NightPredator,代码行数:54,代码来源:NonPlayerCharacterHandler.cs

示例3: Add

        public bool Add(Identity from, IItem item)
        {
            if (from.Equals(this.Shopper))
            {
                this.vendorsBag.Add(this.vendorsBag.FindFreeSlot(), item);
                LogUtil.Debug(DebugInfoDetail.Shopping, "Added Item from character " + from.ToString(true));
            }
            else
            {
                this.charactersBag.Add(from.Instance);
                LogUtil.Debug(DebugInfoDetail.Shopping, "Added Item from shop on position " + from.ToString(true));
            }

            // For now no invalid trades
            return true;
        }
开发者ID:gordonc64,项目名称:CellAO-NightPredator,代码行数:16,代码来源:TemporaryBag.cs


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