public void RenderInRect(Default.Namespace.CGRect inRect, float inAlpha) { this.CheckRender(); myObject.transform.localEulerAngles = new Vector3(0.0f, 0.0f, 0.0f); if (inAlpha != prevAlpha) { this.SetAlpha(inAlpha); } MeshFilter mf = myObject.GetComponent <MeshFilter>(); Mesh mesh; if (mf.sharedMesh == null) { mesh = new Mesh(); } else { mesh = mf.sharedMesh; } Vector3[] vertices = new Vector3[4]; Vector3 newPos; newPos.x = inRect.Origin.x; newPos.y = inRect.Origin.y; newPos.z = Default.Namespace.Globals.renderCounter; inRect.Origin.x -= 160.0f; inRect.Origin.y -= 240.0f; // - inRect.Origin.y; float halfWidth = inRect.Size.Width * 0.5f; float halfHeight = inRect.Size.Height * 0.5f; vertices[0] = new Vector3(-halfWidth, -halfHeight, 0.0f); vertices[1] = new Vector3(halfWidth, -halfHeight, 0.0f); vertices[2] = new Vector3(-halfWidth, halfHeight, 0.0f); vertices[3] = new Vector3(halfWidth, halfHeight, 0.0f); myObject.transform.position = newPos; Default.Namespace.Globals.renderCounter -= 0.1f; mesh.vertices = vertices; mesh.RecalculateBounds(); mf.sharedMesh = mesh; }
void RenderGreenAntScreen(float ratio) { Default.Namespace.CGRect bounds = Default.Namespace.UIScreen.bounds; //crikey this is nuts. if (Default.Namespace.Globals.g_world.screenWidth > bounds.Size.Width) { float scaleM = Default.Namespace.Globals.g_world.screenWidth / bounds.Size.Width; bounds.Size.Width *= scaleM; bounds.Size.Height *= scaleM; } Default.Namespace.Globals.g_main._billboards[(int)CrashLandingAppDelegate.Enum4.kTexture_GreenAntSplash].RenderInRect(bounds, ratio); // Default.Namespace.Globals.g_main._billboards[(int)CrashLandingAppDelegate.Enum4.kTexture_GreenAntSplash].RenderAtPosition(bounds, ratio); }
void RenderChillingoScreen(float ratio) { Default.Namespace.CGRect chillRect = new Default.Namespace.CGRect(); float scaleMultiplier; if (Default.Namespace.Globals.g_main.usingTextureResolution == TextureResolutionEnum.kTextureResolution_Low) { scaleMultiplier = 320.0f / Screen.width; } else { scaleMultiplier = 1024.0f / Screen.height; } chillRect.Size.Width = Screen.width * scaleMultiplier; chillRect.Size.Height = chillRect.Size.Width * 2.0f; // * scaleMultiplier; // col.a = ratio; Default.Namespace.Globals.g_main.chillingoBoard.alpha = ratio; // Default.Namespace.Globals.g_main._billboards[(int)CrashLandingAppDelegate.Enum4.kTexture_Chillingo].SetAlphaWithColour(ratio); }
public void DrawInRectTexScrollP1P2(CGRect rect, float ySize, float yScroll) { }
public void DrawInRectAlphaP1(Billboard useB, CGRect rect, float inAlpha) { useB.RenderInRect(rect, inAlpha); }
public void DrawInRectAlphaP1(CGRect rect, float inAlpha) { // myBillboard.RenderInRect(rect,inAlpha); }
public void DrawInRectWithoutShorts(CGRect rect) { }
public void DrawInRect(CGRect rect) { // myBillboard.RenderInRect(rect,1.0f); }
public void DrawInRectColourP1(CGRect rect, Constants.RossColour inCol) { }