A game about forced loneliness, made by TACStudios
1using UnityEngine; 2 3namespace Unity.VisualScripting 4{ 5 public class StickyNote : GraphElement<IGraph> 6 { 7 [DoNotSerialize] public static readonly Color defaultColor = new Color(.969f, .91f, .624f); 8 9 public StickyNote() : base() { } 10 11 [Serialize] public Rect position { get; set; } 12 13 [Serialize] public string title { get; set; } = "Sticky Note"; 14 15 [Serialize] 16 [InspectorTextArea(minLines = 1)] 17 public string body { get; set; } 18 19 [Serialize] [Inspectable] public ColorEnum colorTheme { get; set; } 20 21 public enum ColorEnum 22 { 23 Classic, 24 Black, 25 Dark, 26 Orange, 27 Green, 28 Blue, 29 Red, 30 Purple, 31 Teal, 32 } 33 34 public static Color GetStickyColor(ColorEnum enumValue) 35 { 36 switch (enumValue) 37 { 38 case ColorEnum.Black: 39 return new Color(.122f, .114f, .09f); 40 case ColorEnum.Dark: 41 return new Color(.184f, .145f, .024f); 42 case ColorEnum.Orange: 43 return new Color(.988f, .663f, .275f); 44 case ColorEnum.Green: 45 return new Color(.376f, .886f, .655f); 46 case ColorEnum.Blue: 47 return new Color(.518f, .725f, .855f); 48 case ColorEnum.Red: 49 return new Color(1f, .502f, .502f); 50 case ColorEnum.Purple: 51 return new Color(.98f, .769f, .949f); 52 case ColorEnum.Teal: 53 return new Color(.475f, .878f, .89f); 54 default: 55 //Classic 56 return new Color(.969f, .91f, .624f); 57 } 58 } 59 60 public static Color GetFontColor(ColorEnum enumValue) 61 { 62 switch (enumValue) 63 { 64 case ColorEnum.Black: 65 case ColorEnum.Dark: 66 return Color.white; 67 default: 68 return Color.black; 69 } 70 } 71 } 72}