本文整理汇总了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();
}
}
示例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>();
}