Ejemplo n.º 1
0
        protected override void OnLoad()
        {
            base.OnLoad();

            for (var i = 0; i < 32; i++)
            {
                SetText(i, "", 0, i * 16.0f);
            }
            backBrush = new SolidBrush(Color.FromArgb(64, 0, 0, 0));

            mqo = MMW.FindGameObject((o => o.Tags.Contains("mqo")));
        }
Ejemplo n.º 2
0
        protected override void Draw(double deltaTime, Camera camera)
        {
            var wp  = GameObject.Transform.WorldPosition;
            var vp  = camera.View * camera.Projection;
            var mvp = GameObject.Transform.WorldTransform * vp;

            GL.Disable(EnableCap.DepthTest);

            var color = Color4.Gray;

            if (Bone.BoneType == "IK")
            {
                color = Color4.Red;
            }
            if (Bone.BoneType == "UnderIK")
            {
                color = Color4.Green;
            }
            if (Bone.BoneType == "IKConnect")
            {
                color = Color4.Blue;
            }
            if (Bone.BoneType != "Standard")
            {
                Drawer.DrawWireframeSphere(0.01f, mvp, color);

                if (Bone.Children != null)
                {
                    foreach (var b in Bone.Children)
                    {
                        var p   = GameObject.Transform.Position;
                        var obj = MMW.FindGameObject(o =>
                        {
                            var bvt = o.GetComponent <BoneVisibleTest>();
                            if (bvt == null)
                            {
                                return(false);
                            }
                            return(bvt.Bone == b);
                        });
                        Drawer.DrawLine(wp, obj.Transform.WorldPosition, vp, Color4.Blue);
                    }
                }
            }

            //Drawer.DrawLine(wp, wp + Bone.AxisX * 0.1f, vp, Color4.Red);
            //Drawer.DrawLine(wp, wp + Bone.AxisZ * 0.1f, vp, Color4.Blue);
            //Drawer.DrawLine(wp, wp + Bone.FixedAxis * 0.1f, vp, Color4.Purple);
            GL.Enable(EnableCap.DepthTest);
        }