コード例 #1
0
        public void Init(EraserManager eraserManager, Settings settings)
        {
            this.eraserManager = eraserManager;

            inkLayer    = settings.inkLayer;
            eraserLayer = settings.eraserLayer;
            inkPrefix   = settings.inkPrefix;
            inkPoolName = settings.inkPoolName;

            gameObject.layer = eraserLayer;

            renderer = GetComponent <Renderer>();
            if (eraserManager)
            {
                // For stand-alone erasers
                pickup = (VRC_Pickup)GetComponent(typeof(VRC_Pickup));
                pickup.InteractionText = nameof(Eraser);
                pickup.UseText         = "Erase";
            }
            else
            {
                renderer.sharedMaterial = normal;
                inkPool = settings.inkPool;
            }
        }
コード例 #2
0
ファイル: Eraser.cs プロジェクト: ureishi/QvPen
        public void Init(EraserManager manager)
        {
            eraserManager = manager;

            gameObject.layer = eraserLayer;

            renderer         = GetComponent <Renderer>();
            renderer.enabled = true;
            if (!eraserManager)
            {
                // For stand-alone erasers
                renderer.sharedMaterial = normal;
            }

            pickup = (VRC_Pickup)GetComponent(typeof(VRC_Pickup));
            if (pickup)
            {
                pickup.InteractionText = nameof(Eraser);
                pickup.UseText         = "Erase";
            }
        }