Пример #1
0
 public void Paint(PaintableSurfaceTexture surface)
 {
     surface.PaintSurface(new PaintSurfaceInfo
     {
         WorldPos = WorldPos2D,
         Radius   = (int)(PaintingData.Radius * RadiusMult),
         Color    = PaintingData.Color
     });
 }
Пример #2
0
    public void Update()
    {
        if (Surface == null)
        {
            var go = GameObject.FindGameObjectWithTag("MainSurface");

            if (go == null)
            {
                return;
            }

            Surface = go.GetComponent <PaintableSurfaceTexture>();
        }

        if (ReleasePaint || Surface != null)
        {
            Paint(Surface);
        }
    }