本文整理汇总了C#中CelestialBody类的典型用法代码示例。如果您正苦于以下问题:C#CelestialBody类的具体用法?C#CelestialBody怎么用?C#CelestialBody使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:Overlay
publicOverlay(stringplanet,floataltitude,MaterialscaledMaterial,MaterialmacroMaterial,Vector2rotation,intlayer,TransformcelestialTransform,boolmainMenu,boolmatchTerrain)
{
this.MainMenu=mainMenu;
this.OverlayGameObject=newGameObject();
this.Body=planet;
this.Rotation=rotation;
this.scaledMaterial=scaledMaterial;
this.macroMaterial=macroMaterial;
this.OriginalLayer=layer;
this.celestialTransform=celestialTransform;
this.altitude=altitude;
this.matchTerrain=matchTerrain;
CelestialBody[]celestialBodies=(CelestialBody[])CelestialBody.FindObjectsOfType(typeof(CelestialBody));
celestialBody=celestialBodies.First(n=>n.bodyName==this.Body);
if(!mainMenu&&matchTerrain)
{
IsoSphere.Create(OverlayGameObject,this.altitude,celestialBody);
}
else
{
IsoSphere.Create(OverlayGameObject,this.Radius,null);
}
varmr=OverlayGameObject.AddComponent
();
mr.sharedMaterial=scaledMaterial;
mr.castShadows=false;
mr.receiveShadows=false;
//mr.enabled=mainMenu;
mr.enabled=true;
}
原文链接:http://www.jxszl.com/biancheng/C/556700.html