本文整理汇总了C#中UnityEngine.Color.WithA方法的典型用法代码示例。如果您正苦于以下问题:C# Color.WithA方法的具体用法?C# Color.WithA怎么用?C# Color.WithA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine.Color
的用法示例。
在下文中一共展示了Color.WithA方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildingDraft
public static MeshDraft BuildingDraft(float width, float length, int floorCount, bool hasAttic, Color wallColor)
{
float height = FloorHeight*floorCount + SocleHeight + (hasAttic ? AtticHeight : 0);
BuildingGenerator.wallColor = wallColor.WithA(0);
var draft = new MeshDraft {name = "Building"};
var corners = new Vector3[]
{
Vector3.left*length/2 + Vector3.back*width/2,
Vector3.right*length/2 + Vector3.back*width/2,
Vector3.right*length/2 + Vector3.forward*width/2,
Vector3.left*length/2 + Vector3.forward*width/2
};
commonPanelConstructors[PanelType.Entrance] = panelConstructors[PanelType.Entrance].GetRandom();
commonPanelConstructors[PanelType.EntranceWall] = panelConstructors[PanelType.EntranceWall].GetRandom();
List<FloorPlan> facadePlan0 = FacadeGenerator(length, floorCount, hasAttic, true, true);
draft.Add(Facade(corners[0], Vector3.right, facadePlan0));
List<FloorPlan> facadePlan1 = FacadeGenerator(width, floorCount, hasAttic);
draft.Add(Facade(corners[1], Vector3.forward, facadePlan1));
List<FloorPlan> facadePlan2 = FacadeGenerator(length, floorCount, hasAttic, false, true);
draft.Add(Facade(corners[2], Vector3.left, facadePlan2));
List<FloorPlan> facadePlan3 = FacadeGenerator(width, floorCount, hasAttic);
draft.Add(Facade(corners[3], Vector3.back, facadePlan3));
draft.Add(Roof(corners[0], corners[1], corners[2], corners[3], Vector3.up*height));
var basement = MeshDraft.Quad(corners[0], corners[1], corners[2], corners[3]);
basement.Paint(roofColor);
draft.Add(basement);
return draft;
}