本文整理汇总了C#中Planet.LoadContent方法的典型用法代码示例。如果您正苦于以下问题:C# Planet.LoadContent方法的具体用法?C# Planet.LoadContent怎么用?C# Planet.LoadContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Planet
的用法示例。
在下文中一共展示了Planet.LoadContent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterActors
public void RegisterActors()
{
#region 3D Stuff
Camera camera = new Camera("mainMenuCamera", new Vector3(0, 50, 600), Vector3.Zero);
camera.LoadContent();
CameraManager.Instance.CurrentCamera = "mainMenuCamera";
SkySphere sky = new SkySphere("SkySphereMainMenuView", "space", 10000f);
sky.Position = Vector3.Zero;
sky.LoadContent();
SceneGraphManager.RootNode.Children.Add(sky);
Planet planet = new Planet("GamePlanetEarth",700f);
planet.Position = new Vector3(-1200, 0, -600);
planet.LoadContent();
SceneGraphManager.RootNode.Children.Add(planet);
/* Box box = new Box("box", 1f);
box.Position = new Vector3(0, 0, 0);
//box.Offset = new Vector3(0, 0, 0);
box.LoadContent();
Sphere sphere = new Sphere("sphereBox", 2f);
sphere.Offset = new Vector3(0, 0, 0);
sphere.LoadContent();
box.Children.Add(sphere);*/
//SceneGraphManager.RootNode.Children.Add(box);
#endregion
#region UI Stuff
TextElement headline = new TextElement("TextElementHeadline", new Vector2(400, 100), Color.Yellow, "Space Commander", ResourceManager.Instance.GetResource<SpriteFont>("Arial"));
headline.Scale = 1f;
UIManager.Instance.AddActor(headline);
Button startNewGameButton = new Button("ButtonStartNewGame", new Vector2(400, 150), ResourceManager.Instance.GetResource<Texture2D>("startnewgame_button"), 312, 83);
startNewGameButton.LoadContent();
UIManager.Instance.AddActor(startNewGameButton);
#endregion
}