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