Пример #1
0
        public bool Inspect()
        {
            var changed = false;


            ("Will cast a ray in transform.forward direction when Left Mouse Button is pressed. " +
             "Target objects need to have PlaytimePainter component attached. Then this brush will be applied " +
             "on texture (if not locked) selected on target PlaytimePainter component" +
             "This Component has it's own brush configuration. Can be replaced with PainterCamera.Data.brushConfig " +
             "to use global brush.").fullWindowDocumentationClickOpen("How to use Skinned Mesh Caster", 15);


            if ("Paint!".Click().nl())
            {
                Paint();
            }

            "Last ray Cast result: {0}".F(lastShotResult).nl();

            brush.Targets_PEGI().nl(ref changed);
            brush.Mode_Type_PEGI().nl(ref changed);
            brush.ColorSliders().nl(ref changed);


            return(changed);
        }
Пример #2
0
        public bool Inspect()
        {
            var changed = false;

            pegi.fullWindowDocumentationClickOpen(Documentation);

            "Bullets:".edit(50, ref shoots, 1, 50).nl(ref changed);
            "Spread:".edit(50, ref spread, 0f, 1f).nl(ref changed);

            if ("Fire!".Click().nl())
            {
                Paint();
            }

            brush.Targets_PEGI().nl(ref changed);
            brush.Mode_Type_PEGI().nl(ref changed);
            brush.ColorSliders().nl(ref changed);

            if (!brush.PaintingRGB)
            {
                "Enable RGB, disable A to use faster Brush Shader (if painting to RenderTexture).".writeHint();
            }

            return(changed);
        }
Пример #3
0
    public bool PEGI()
    {
        bool changed = false;

        changed |= brush.Targets_PEGI().nl();
        changed |= brush.Mode_Type_PEGI().nl();
        changed |= brush.ColorSliders_PEGI();

        return(changed);
    }
Пример #4
0
        public bool Inspect()
        {
            var changed = false;

            ("When colliding with other object will try to use sphere brush to paint on them." +
             "Targets need to have PlaytimePainter component").fullWindowDocumentationClickOpen("About Painter Ball");


            if (Application.isPlaying)
            {
                "Painting on {0} objects".F(paintingOn.Count).nl();
            }

            if (_collider.isTrigger && "Set as Rigid Collider object".Click().nl(ref changed))
            {
                _collider.isTrigger = false;
                rigid.isKinematic   = false;
                rigid.useGravity    = true;
            }

            if (!_collider.isTrigger && "Set as Trigger".Click().nl(ref changed))
            {
                _collider.isTrigger = true;
                rigid.isKinematic   = true;
                rigid.useGravity    = false;
            }

            var size = transform.localScale.x;

            if ("Size:".edit("Size of the ball", 50, ref size, 0.1f, 10).nl(ref changed))
            {
                transform.localScale = Vector3.one * size;
            }

            "Painter ball made for World Space Brushes only".writeOneTimeHint("PaintBall_brushHint");

            if ((brush.Targets_PEGI().nl(ref changed)) || (brush.Mode_Type_PEGI().nl(ref changed)))
            {
                if (brush.targetIsTex2D || !brush.IsA3DBrush(null))
                {
                    brush.targetIsTex2D = false;
                    brush.SetBrushType(false, BrushTypeSphere.Inst);

                    "PaintBall_brushHint".resetOneTimeHint();
                }
            }

            if (brush.ColorSliders())
            {
                rendy.sharedMaterial.color = brush.Color;
            }

            return(false);
        }
Пример #5
0
        public bool Inspect()
        {
            var changed = false;

            pegi.toggleDefaultInspector(this);

            pegi.fullWindowDocumentationClickOpen(Documentation);

            "Continious".toggleIcon(ref continious).nl();

            if (!continious)
            {
                "Bullets:".edit(50, ref shoots, 1, 50).nl(ref changed);
                "Spread:".edit(50, ref spread, 0f, 1f).nl(ref changed);
            }

            if ("Fire!".Click().nl())
            {
                Paint();
            }

            brush.Targets_PEGI().nl(ref changed);
            brush.Mode_Type_PEGI().nl(ref changed);
            brush.ColorSliders().nl(ref changed);

            if (brush.targetIsTex2D)
            {
                "Script expects Render Texture terget".writeWarning();
                pegi.nl();

                if ("Switch to Render Texture".Click())
                {
                    brush.targetIsTex2D = false;
                }
            }
            else if (brush.GetBrushType(false).GetType() != typeof(BrushTypes.Sphere))
            {
                "This component works best with Sphere Brush? also supports Normal Brush.".writeHint();
                //if ("Switch to Sphere Brush".Click())
                //  brush.SetBrushType(false, BrushTypes.Sphere.Inst);
            }


            if (!brush.PaintingRGB)
            {
                "Enable RGB, disable A to use faster Brush Shader (if painting to RenderTexture).".writeHint();
            }

            return(changed);
        }
Пример #6
0
        public bool Inspect()
        {
            var changed = false;

            ("During collision will try to cast ray in the direction of that collision. " +
             "If target has Playtime Painter Component this script will try to paint on it.").fullWindowDocumentationClickOpen("How to use Raycast On Collision");

            if (Application.isPlaying)
            {
                "Painting on {0} objects".F(_paintingOn.Count).nl();
            }

            brush.Targets_PEGI().nl(ref changed);
            brush.Mode_Type_PEGI().nl(ref changed);
            brush.ColorSliders().nl(ref changed);

            return(changed);
        }