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


C# Scene.GetSceneNameString方法代码示例

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


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

示例1: WorldScene

 public WorldScene(Scene scene, float boxSize, float boxTolerance)
 {
     using (new PerformanceLogger("[WorldScene] ctor", false))
     {
         //                Logger.Debug("[WorldScene] Scene GridSquare Size: {0} X:{1} Y:{2}", scene.Mesh.Zone.NavZoneDef.GridSquareSize,scene.Mesh.Zone.NavZoneDef.NavGridSquareCountX, scene.Mesh.Zone.NavZoneDef.NavGridSquareCountY);
         _boxSize = boxSize;
         _boxTolerance = boxTolerance;
         Scene = scene;
         Name = scene.Name;
         HashName = scene.GetSceneNameString();
         LevelAreaId = Scene.Mesh.LevelAreaSNO;
         Min = Scene.Mesh.Zone.ZoneMin;
         Max = Scene.Mesh.Zone.ZoneMax;
         Center = (Max + Min) / 2;
         //Rect = new Rect(new Point(Center.X, Center.Y), new Size(_boxSize, _boxSize));
         HasChild = Scene.Mesh.SubSceneId > 0;
         HasParent = Scene.Mesh.ParentSceneId > 0;
         IsIgnored = ExplorationData.IgnoreScenes.Contains(Scene.Name);
         DynamicWorldId = Scene.Mesh.DynamicWorldId;
         SceneId = scene.Mesh.SceneId;
         if (HasChild)
         {
             SubScene = new WorldScene(Scene.Mesh.SubScene, boxSize, boxTolerance);
             if (SubScene.HasChild)
             {
                 Logger.Error("[ScenesStorage] Found sub sub scene!!!");
                 SubScene.SubScene = new WorldScene(SubScene.Scene.Mesh.SubScene, boxSize, boxTolerance);
             }
         }
         Logger.Verbose("[WorldScene] Created a new world scene. Name: {0} LevelArea: {1} ({2})", Name, (SNOLevelArea)LevelAreaId, LevelAreaId);
         if (LevelAreaId != AdvDia.CurrentLevelAreaId && !ExplorationData.OpenWorldIds.Contains(AdvDia.CurrentWorldId))
         {
             Logger.Verbose("[WorldScene] The scene LevelAreaID is different than the CurrentLevelAreaID");
             Logger.Verbose("[WorldScene] Scene Name: {0}", Name);
             Logger.Verbose("[WorldScene] Scene: {0} ({1})", (SNOLevelArea)LevelAreaId, LevelAreaId);
             Logger.Verbose("[WorldScene] Current: {0} ({1})", (SNOLevelArea)AdvDia.CurrentLevelAreaId, AdvDia.CurrentLevelAreaId);
         }
         CreateGrid();
     }
 }
开发者ID:mythsya,项目名称:db-plugins,代码行数:40,代码来源:WorldScene.cs

示例2: SceneNodes

 public static IEnumerable<ExplorationNode> SceneNodes(Scene scene)
 {
     if (scene.IsAlmostValid())
     {
         var sceneNameHash = scene.GetSceneNameString();
         if (CurrentWorldSceneIds.Contains(sceneNameHash))
         {
             var adventurerScene = CurrentWorldScenes.FirstOrDefault(s => s.HashName == sceneNameHash);
             if (adventurerScene != null)
             {
                 return adventurerScene.Nodes;
             }
         }
     }
     return new List<ExplorationNode>();
 }
开发者ID:dachidahu,项目名称:AutoFollow,代码行数:16,代码来源:ScenesStorage.cs


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