Beispiel #1
0
        private void CreateJumpPoint(SceenElement parent, JumpPoint oJumpPoint)
        {
            SceenElement oJumpPointElement = new JumpPointElement(oJumpPoint);

            oJumpPointElement.EntityID = oJumpPoint.Id;

            Vector3 v3JPPos = new Vector3((float)oJumpPoint.Position.X, (float)oJumpPoint.Position.Y, 0.0f);

            GLQuad oJPQuad = new GLUtilities.GLQuad(SceenDefaultEffect,
                                                    v3JPPos,
                                                    new Vector2(0.0001f, 0.0001f),                           // what size is a jump point anyway???
                                                    Color.Cyan,
                                                    UIConstants.Textures.DEFAULT_JUMPPOINT_ICON);

            GLUtilities.GLFont oNameLable = new GLUtilities.GLFont(SceenDefaultEffect, v3JPPos,
                                                                   UIConstants.DEFAULT_TEXT_SIZE, Color.Cyan, UIConstants.Textures.DEFAULT_GLFONT2, oJumpPoint.Name);

            oJumpPointElement.Lable            = oNameLable;
            oJumpPointElement.PrimaryPrimitive = oJPQuad;
            oJumpPointElement.AddPrimitive(oJPQuad);
            oJumpPointElement.RealSize = new Vector2(0.0001f, 0.0001f);
            parent.AddChildElement(oJumpPointElement);
        }
Beispiel #2
0
        private void CreateJumpPoint(SceenElement parent, JumpPoint oJumpPoint)
        {
            SceenElement oJumpPointElement = new JumpPointElement(oJumpPoint);
            oJumpPointElement.EntityID = oJumpPoint.Id;

            Vector3 v3JPPos = new Vector3((float)oJumpPoint.Position.X, (float)oJumpPoint.Position.Y, 0.0f);

            GLQuad oJPQuad = new GLUtilities.GLQuad(SceenDefaultEffect,
                                                            v3JPPos,
                                                            new Vector2(0.0001f, 0.0001f),                   // what size is a jump point anyway???
                                                            Color.Cyan,
                                                            UIConstants.Textures.DEFAULT_JUMPPOINT_ICON);

            GLUtilities.GLFont oNameLable = new GLUtilities.GLFont(SceenDefaultEffect, v3JPPos,
            UIConstants.DEFAULT_TEXT_SIZE, Color.Cyan, UIConstants.Textures.DEFAULT_GLFONT2, oJumpPoint.Name);

            oJumpPointElement.Lable = oNameLable;
            oJumpPointElement.PrimaryPrimitive = oJPQuad;
            oJumpPointElement.AddPrimitive(oJPQuad);
            oJumpPointElement.RealSize = new Vector2(0.0001f, 0.0001f);
            parent.AddChildElement(oJumpPointElement);
        }