예제 #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);
 }
예제 #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());
     }
 }
예제 #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++;
             }
         }
     }
 }
예제 #5
0
 private Texture2D CreateDummyTexture()
 {
     return GraphicsL.CreateMonoColorTexture(size, color.Value);
 }
예제 #6
0
 private Texture2D CreateCircleTexture()
 => GraphicsL.CreateMonoColorCircleTexture(Size, Color.Value);
예제 #7
0
 private Texture2D CreateRectangleTexture()
 => GraphicsL.CreateMonoColorTexture(Size, Color.Value);