public CatStyle(CatCoat coat, Color primary_color, Color secondary_color) { this.coat = coat; this.primary_color = primary_color; this.secondary_color = secondary_color; // Apply this color/texture to the cat Apply(); }
// Generates and returns a random cat style public static CatStyle RandomStyle() { // TODO: generate more random colors by generating colors within ranges of HSV values Color[] possible_colors = { new Color(73 / 255F, 71 / 255F, 71 / 255F), new Color(104 / 255F, 61 / 255F, 54 / 255F), new Color(145 / 255F, 53 / 255F, 30 / 255F), new Color(183 / 255F, 151 / 255F, 136 / 255F) }; CatCoat coat = CatCoat.Solid; Color primary = possible_colors[UnityEngine.Random.Range(0, possible_colors.Length)]; return(new CatStyle(coat, primary, new Color(0F, 0F, 0F))); }