Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- /*
- // Place your snippets for C# here. Each snippet is defined under a snippet name and has a prefix, body and
- // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
- // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
- // same ids are connected.
- // Example:
- "Print to console": {
- "prefix": "log",
- "body": [
- "console.log('$1');",
- "$2"
- ],
- "description": "Log output to console"
- }
- */
- "Entitas Reactive System": {
- "prefix": "ers",
- "body": [
- "using System.Collections.Generic;",
- "using Entitas;",
- "using UnityEngine;",
- "using System.Linq;",
- "using TKLibs;",
- "",
- "public class $1 : ReactiveSystem<GameEntity>",
- "{",
- " GameContext _context;",
- " public $1(Contexts contexts) : base(contexts.game){",
- " _context = contexts.game;",
- " }",
- "",
- " protected override ICollector<GameEntity> GetTrigger(IContext<GameEntity> context)",
- " {",
- " return context.CreateCollector();",
- " }",
- "",
- " protected override bool Filter(GameEntity entity)",
- " {",
- " return true;",
- " }",
- "",
- " protected override void Execute(List<GameEntity> entities)",
- " {",
- "",
- " }",
- "}"
- ],
- "description": "Entitas Reactive System Template"
- },
- "Entitas Execute System": {
- "prefix": "ees",
- "body": [
- "using System.Collections.Generic;",
- "using Entitas;",
- "using UnityEngine;",
- "using System.Linq;",
- "using TKLibs;",
- "",
- "public class $1 : IExecuteSystem",
- "{",
- "",
- "GameContext _context;",
- " public $1(Contexts contexts) {",
- " _context = contexts.game;",
- " }",
- "",
- " public void Execute()",
- " {",
- "",
- " }",
- "}"
- ],
- "description": "Entitas Execute System Template"
- },
- "Entitas Feature": {
- "prefix": "ef",
- "body": [
- "using Entitas;",
- "using System.Linq;",
- "using TKLibs;",
- "",
- "public class $1 : Feature",
- "{",
- " public $1(Contexts contexts) : base(\"$1\")",
- " {",
- " Add(new $2(contexts));",
- " }",
- "}"
- ],
- "description": "Entitas Feature Template"
- },
- "Entitas Initialize System": {
- "prefix": "ef",
- "body": [
- "using System.Collections.Generic;",
- "using Entitas;",
- "using UnityEngine;",
- "using System.Linq;",
- "using TKLibs;",
- "",
- "public class $1 : IInitializeSystem",
- "{",
- " GameContext _context;",
- " public $1(Contexts contexts)",
- " {",
- " _context = contexts.game;",
- " }",
- "",
- " public void Initialize()",
- " {",
- " throw new System.NotImplementedException();",
- " }",
- "}"
- ],
- "description": "Entitas Initialize System Template"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment