Ejemplo n.º 1
0
    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;
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
    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);
    }
Ejemplo n.º 4
0
 public void DrawInRectTexScrollP1P2(CGRect rect, float ySize, float yScroll)
 {
 }
Ejemplo n.º 5
0
 public void DrawInRectAlphaP1(Billboard useB, CGRect rect, float inAlpha)
 {
     useB.RenderInRect(rect, inAlpha);
 }
Ejemplo n.º 6
0
        public void DrawInRectAlphaP1(CGRect rect, float inAlpha)
        {
//			myBillboard.RenderInRect(rect,inAlpha);
        }
Ejemplo n.º 7
0
 public void DrawInRectWithoutShorts(CGRect rect)
 {
 }
Ejemplo n.º 8
0
        public void DrawInRect(CGRect rect)
        {
//			myBillboard.RenderInRect(rect,1.0f);
        }
Ejemplo n.º 9
0
 public void DrawInRectColourP1(CGRect rect, Constants.RossColour inCol)
 {
 }