Guest User

Untitled

a guest
Jan 12th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. {
  2. /*
  3. // Place your snippets for C# here. Each snippet is defined under a snippet name and has a prefix, body and
  4. // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
  5. // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
  6. // same ids are connected.
  7. // Example:
  8. "Print to console": {
  9. "prefix": "log",
  10. "body": [
  11. "console.log('$1');",
  12. "$2"
  13. ],
  14. "description": "Log output to console"
  15. }
  16. */
  17.  
  18. "Entitas Reactive System": {
  19. "prefix": "ers",
  20. "body": [
  21. "using System.Collections.Generic;",
  22. "using Entitas;",
  23. "using UnityEngine;",
  24. "using System.Linq;",
  25. "using TKLibs;",
  26. "",
  27. "public class $1 : ReactiveSystem<GameEntity>",
  28. "{",
  29. " GameContext _context;",
  30. " public $1(Contexts contexts) : base(contexts.game){",
  31. " _context = contexts.game;",
  32. " }",
  33. "",
  34. " protected override ICollector<GameEntity> GetTrigger(IContext<GameEntity> context)",
  35. " {",
  36. " return context.CreateCollector();",
  37. " }",
  38. "",
  39. " protected override bool Filter(GameEntity entity)",
  40. " {",
  41. " return true;",
  42. " }",
  43. "",
  44. " protected override void Execute(List<GameEntity> entities)",
  45. " {",
  46. "",
  47. " }",
  48. "}"
  49. ],
  50. "description": "Entitas Reactive System Template"
  51. },
  52. "Entitas Execute System": {
  53. "prefix": "ees",
  54. "body": [
  55. "using System.Collections.Generic;",
  56. "using Entitas;",
  57. "using UnityEngine;",
  58. "using System.Linq;",
  59. "using TKLibs;",
  60. "",
  61. "public class $1 : IExecuteSystem",
  62. "{",
  63. "",
  64. "GameContext _context;",
  65. " public $1(Contexts contexts) {",
  66. " _context = contexts.game;",
  67. " }",
  68. "",
  69. " public void Execute()",
  70. " {",
  71. "",
  72. " }",
  73. "}"
  74. ],
  75. "description": "Entitas Execute System Template"
  76. },
  77. "Entitas Feature": {
  78. "prefix": "ef",
  79. "body": [
  80. "using Entitas;",
  81. "using System.Linq;",
  82. "using TKLibs;",
  83. "",
  84. "public class $1 : Feature",
  85. "{",
  86. " public $1(Contexts contexts) : base(\"$1\")",
  87. " {",
  88. " Add(new $2(contexts));",
  89. " }",
  90. "}"
  91. ],
  92. "description": "Entitas Feature Template"
  93. },
  94. "Entitas Initialize System": {
  95. "prefix": "ef",
  96. "body": [
  97. "using System.Collections.Generic;",
  98. "using Entitas;",
  99. "using UnityEngine;",
  100. "using System.Linq;",
  101. "using TKLibs;",
  102. "",
  103. "public class $1 : IInitializeSystem",
  104. "{",
  105. " GameContext _context;",
  106. " public $1(Contexts contexts)",
  107. " {",
  108. " _context = contexts.game;",
  109. " }",
  110. "",
  111. " public void Initialize()",
  112. " {",
  113. " throw new System.NotImplementedException();",
  114. " }",
  115. "}"
  116. ],
  117. "description": "Entitas Initialize System Template"
  118. }
  119. }
Advertisement
Add Comment
Please, Sign In to add comment