Advertisement
katubug

lol im learning

Jan 5th, 2023
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3.  
  4. public class Encyclopedia : MonoBehaviour
  5. {
  6. public enum PlantKind
  7. {
  8. Borage,
  9. Camellia, Caraway, Chamomile, Chicory, Clove, ClubMoss,
  10. Dandelion,
  11. Eyebright,
  12. Fairywand,
  13. Galbanum, GardenPea, GroundElder,
  14. Heather,
  15. LemonMyrtle, Licorice, LilyValley,
  16. Moonwort, Mugwort,
  17. Parsley, Primrose,
  18. Rosemary,
  19. SickleHareEar, SolomonSeal,
  20. Tragacanth, Turmeric,
  21. Vetiver,
  22. WitchGrass, WoodSorrel,
  23. Yarrow, Fern, Rose
  24. };
  25.  
  26. public enum PlantEffects
  27. {
  28. Abundance,
  29. Calm,
  30. Change,
  31. Cleansing,
  32. Creativity,
  33. ElementAir,
  34. ElementEarth,
  35. ElementFire,
  36. ElementWater,
  37. Energy,
  38. Friendship,
  39. Growth,
  40. Happiness,
  41. Healing,
  42. Love,
  43. Luck,
  44. Moon,
  45. Protection,
  46. Strength,
  47. Sun,
  48. Truth,
  49. Wishes,
  50. Wisdom,
  51. Witchcraft
  52. }
  53.  
  54. // A class to store information about a single plant
  55. public class PlantEntry
  56. {
  57. public string name;
  58. public string info;
  59. }
  60.  
  61. public class PlantEffectMagnitude
  62. {
  63. public string effectName;
  64. public float effectMag;
  65. }
  66.  
  67. // A dictionary to store information about all of the plants
  68. public static Dictionary<PlantKind, PlantEntry> allPlants = new()
  69. {
  70. { PlantKind.Borage, new PlantEntry() { name = "Borage", info = "Borage is often used to boost courage." }, new PlantEffects() { Abundance } },
  71. { PlantKind.Camellia, new PlantEntry() { name = "Camellia sinensis", info = "This is tea." } },
  72. { PlantKind.Fern, new PlantEntry() { name = "Fern", info = "This is fern." } },
  73. { PlantKind.Dandelion, new PlantEntry() { name = "Dandelion", info = "This is dandelion." } },
  74. { PlantKind.Rose, new PlantEntry() { name = "Rose", info = "This is rose." } }
  75. };
  76.  
  77. public static PlantEntry GetEntry(PlantKind plantKind)
  78. {
  79. return allPlants[plantKind];
  80. }
  81. }
  82.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement