Beispiel #1
0
            new public bool Equals(object obj)
            {
                if (!(obj is MeshDrawer))
                {
                    return(false);
                }
                MeshDrawer data = (MeshDrawer)obj;

                if (mode != data.mode)
                {
                    return(false);
                }
                if (!polygonGetter.Equals(data.polygonGetter))
                {
                    return(false);
                }
                if (!lineGetter.Equals(data.lineGetter))
                {
                    return(false);
                }
                if (!aroundGetter.Equals(data.aroundGetter))
                {
                    return(false);
                }
                return(true);
            }
Beispiel #2
0
        void MeshDrawer(MeshDrawer meshDrawer)
        {
            ClearChildrens(fixed4);
            int y = 0;

            if (meshDrawer.Morphes != null)
            {
                Button btn = new Button();
                btn.Label = "Morhps";
                btn.Name  = "btn";
                fixed4.Put(btn, 0, y);
                btn.Show();
                y           += 35;
                btn.Clicked += (s, e) => { SetMorphList(meshDrawer.Morphes); fixed6.Show(); notebook.Page = morphPanel; };
            }
            foreach (var mat in meshDrawer.Materials)
            {
                var renderDir = mat.RenderDirrectives;

                Button btn = new Button();
                btn.Label       = mat.Name;
                btn.Name        = "btn";
                btn.TooltipText = mat.Name;
                btn.Clicked    += (sender, e) =>
                {
                    renderDir.IsRendered = !renderDir.IsRendered;
                    if (renderDir.IsRendered)
                    {
                        btn.SetStateFlags(StateFlags.Normal, true);
                    }
                    else
                    {
                        btn.SetStateFlags(StateFlags.Checked, true);
                    }
                };


                if (renderDir.IsRendered)
                {
                    btn.SetStateFlags(StateFlags.Normal, true);
                }
                else
                {
                    btn.SetStateFlags(StateFlags.Checked, true);
                }


                fixed4.Put(btn, 0, y);
                btn.Show();
                y += 35;
            }
        }
Beispiel #3
0
    void LateUpdate()
    {
        Camera.main.depthTextureMode |=
            DepthTextureMode.Depth | DepthTextureMode.MotionVectors;

        _particleCount = _master.GetParticles(_particles);

        for (var i = 0; i < _particleCount; i++)
        {
            var t = _particles[i].position;
            var r = Quaternion.Euler(_particles[i].rotation3D);
            var s = _particles[i].GetCurrentSize3D(_master);

            var vt = _particles[i].velocity;
            var vr = _particles[i].angularVelocity3D;

            MeshDrawer.DrawWithVelocity(
                _mesh, t, r, s, vt, vr, _material
                );
        }
    }
 public NPCFaceController(MeshDrawer meshDrawer, Animator animator)
 {
     anim = animator;
     mesh = meshDrawer;
     InitialSetup();
 }