//public bool Linked //{ // get // { // return this.linkType != LinkDrawerType.None; // } //} // Token: 0x170009AC RID: 2476 // (get) Token: 0x06004029 RID: 16425 RVA: 0x001E1282 File Offset: 0x001DF682 //public Graphic Graphic //{ // get // { // if (this.cachedGraphic == null) // { // this.Init(); // } // return this.cachedGraphic; // } //} // Token: 0x0600402A RID: 16426 RVA: 0x001E129C File Offset: 0x001DF69C //public void CopyFrom(GraphicData other) //{ // this.texPath = other.texPath; // this.graphicClass = other.graphicClass; // this.shaderType = other.shaderType; // this.color = other.color; // this.colorTwo = other.colorTwo; // this.drawSize = other.drawSize; // this.onGroundRandomRotateAngle = other.onGroundRandomRotateAngle; // this.drawRotated = other.drawRotated; // this.allowFlip = other.allowFlip; // this.flipExtraRotation = other.flipExtraRotation; // this.shadowData = other.shadowData; // this.damageData = other.damageData; // this.linkType = other.linkType; // this.linkFlags = other.linkFlags; //} // Token: 0x0600402B RID: 16427 RVA: 0x001E1354 File Offset: 0x001DF754 private void Init() { if (graphicClass == null) { cachedGraphic = null; return; } var cutout = shaderType; if (cutout == null) { cutout = ShaderTypeDefOf.Cutout; } var shader = cutout.Shader; cachedGraphic = GraphicDatabase.Get(graphicClass, texPath, shader, drawSize, color, colorTwo, this, shaderParameters); if (onGroundRandomRotateAngle > 0.01f) { cachedGraphic = new Graphic_RandomRotated(cachedGraphic, onGroundRandomRotateAngle); } if (Linked) { cachedGraphic = GraphicUtility.WrapLinked(cachedGraphic, linkType); } }
static Graphics() { DetWireOverlayAtlas = GraphicUtility.WrapLinked(DetWireOverlayAtlas, LinkDrawerType.Basic); DetWireOverlayAtlas.data = new GraphicData { linkFlags = OverlayAtlasLinkFlags }; }
static Graphics() { DetWireOverlayAtlas = GraphicUtility.WrapLinked(DetWireOverlayAtlas, LinkDrawerType.Basic); DetWireOverlayAtlas.data = new GraphicData { linkFlags = OverlayAtlasLinkFlags }; FlareOverlayNormal.drawSize = FlareOverlayStrong.drawSize = Vector2.one; }
static PowerOverlayMats() { Graphic graphic = GraphicDatabase.Get <Graphic_Single>("Things/Special/Power/TransmitterAtlas", PowerOverlayMats.TransmitterShader); PowerOverlayMats.LinkedOverlayGraphic = GraphicUtility.WrapLinked(graphic, LinkDrawerType.TransmitterOverlay); graphic.MatSingle.renderQueue = 3600; PowerOverlayMats.MatConnectorBase.renderQueue = 3600; PowerOverlayMats.MatConnectorLine.renderQueue = 3600; }
static PipeOverlayMats() { TransmitterShader = ShaderDatabase.MetaOverlay; MatConnectorBase = MaterialPool.MatFrom("Things/Special/Fluid/VPE_OverlayBase", ShaderDatabase.MetaOverlay); MatConnectorLine = MaterialPool.MatFrom("Things/Special/Power/OverlayWire", ShaderDatabase.MetaOverlay); MatConnectorAnticipated = MaterialPool.MatFrom("Things/Special/Power/OverlayWireAnticipated", ShaderDatabase.MetaOverlay); MatConnectorBaseAnticipated = MaterialPool.MatFrom("Things/Special/Power/OverlayBaseAnticipated", ShaderDatabase.MetaOverlay); Graphic graphic = GraphicDatabase.Get <Graphic_Single>("Things/Special/Fluid/VPE_BlankTransmitterAtlas", TransmitterShader); LinkedOverlayGraphic = GraphicUtility.WrapLinked(graphic, LinkDrawerType.TransmitterOverlay); graphic.MatSingle.renderQueue = 3600; MatConnectorBase.renderQueue = 3600; MatConnectorLine.renderQueue = 3600; }
public void ChangeGraphicColor(Color newColor) { if (color == newColor) { return; } if (graphicClass == typeof(MyGraphicCluster)) { ChangeClusterGraphicsColor(newColor); return; } // If this is a Graphic_Cluster we mustnt change it's this.color or else we get an error color = newColor; //Log.Message("Correct function called"); //if (this.cachedGraphic != null) //{ // string m = this.cachedGraphic.ToString(); // Log.Message(m); //} var cutout = shaderType; if (cutout == null) { cutout = ShaderTypeDefOf.Cutout; } var shader = cutout.Shader; cachedGraphic = GraphicDatabase.Get(graphicClass, texPath, shader, drawSize, color, color, this, shaderParameters); if (onGroundRandomRotateAngle > 0.01f) { cachedGraphic = new Graphic_RandomRotated(cachedGraphic, onGroundRandomRotateAngle); } if (Linked) { cachedGraphic = GraphicUtility.WrapLinked(cachedGraphic, linkType); } }
static SteamOverlayMats() { if (Estate_SteamAtlasGraphic == null) { var graphicData = new GraphicData(); graphicData.graphicClass = typeof(Graphic_Single); graphicData.texPath = "Things/Special/Power/Estate_SteamTransmitterAtlas"; graphicData.linkFlags = LinkFlags.Custom2; graphicData.shaderType = ShaderTypeDefOf.MetaOverlay; Estate_SteamAtlasGraphic = graphicData.Graphic; } Graphic graphic = Estate_SteamAtlasGraphic; SteamOverlayMats.LinkedOverlayGraphic = GraphicUtility.WrapLinked(graphic, LinkDrawerType.TransmitterOverlay); graphic.data.linkFlags = LinkFlags.Custom2; graphic.MatSingle.renderQueue = 3600; SteamOverlayMats.MatConnectorBase.renderQueue = 3600; SteamOverlayMats.MatConnectorLine.renderQueue = 3600; }
static NewPowerOverlayMats() { Graphic graphic = GraphicDatabase.Get <Graphic_Single>(NewPowerOverlayMats.TransmitterAtlasPath, NewPowerOverlayMats.TransmitterShader); NewPowerOverlayMats.LinkedOverlayGraphic = (Graphic_LinkedTransmitterOverlay)GraphicUtility.WrapLinked(graphic, LinkDrawerType.TransmitterOverlay); graphic.MatSingle.renderQueue = 3600; }