Exemplo n.º 1
0
 private void Awake()
 {
     if (PlayerColor.Equals(GraphicsL.fullAlpha))
     {
         GraphicsL.RandomColor();
     }
 }
 private void SetRenderer()
 {
     renderTexture            = GraphicsL.CreateRenderTextureAndApplyAlpha(new Vector2Int(TextureSize, TextureSize), renderTextureDepth);
     renderTexture.filterMode = filterMode;
     renderer.material.SetTexture(NAME_MASK_TEXTURE, renderTexture);
     renderer.material.SetFloat(NAME_INFLUENCE, influence);
 }
Exemplo n.º 3
0
 private static Color32[] GetPixelArray(ObjectPaint tulp, TexturePartInfo item)
 {
     if (item != null)
     {
         var temporary = tulp.Mesh.Countable.GetPixels32();
         return(GraphicsL.GetPartOfArray(temporary, tulp.Mesh.Countable.height, item.Start.x, item.Start.y, item.Finish.x, item.Finish.y));
     }
     else
     {
         return(tulp.Mesh.Countable.GetPixels32());
     }
 }
Exemplo n.º 4
0
 private static void CheckObject(ObjectPaint tulp, TexturePartInfo item = null)
 {
     Color32[] textureToCheck = GetPixelArray(tulp, item);
     foreach (var colorToCheck in textureToCheck)
     {
         foreach (var checkFor in tulp.PaintAmounts)
         {
             if (GraphicsL.CheckIfEqualColors(colorToCheck, checkFor.Color))
             {
                 checkFor.Amount++;
             }
         }
     }
 }
Exemplo n.º 5
0
 private Texture2D CreateDummyTexture()
 {
     return GraphicsL.CreateMonoColorTexture(size, color.Value);
 }
Exemplo n.º 6
0
 private Texture2D CreateCircleTexture()
 => GraphicsL.CreateMonoColorCircleTexture(Size, Color.Value);
Exemplo n.º 7
0
 private Texture2D CreateRectangleTexture()
 => GraphicsL.CreateMonoColorTexture(Size, Color.Value);