This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exec | |
| [JetBrains.Annotations.UsedImplicitly] | |
| public sealed class $name$System : Entitas.IExecuteSystem | |
| { | |
| private readonly IGroup<$Context$Entity> _$group$; | |
| public $name$System($Context$Context $context$) | |
| { | |
| _$group$ = $context$.GetGroup($Context$Matcher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using VContainer; | |
| using VContainer.Unity; | |
| namespace Extensions | |
| { | |
| public static class VContainerExtensions | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class Ex | |
| { | |
| public static IEnumerable<TEntity> GetEntitiesBuffered<TEntity>(this IGroup<TEntity> group) where TEntity : class, IEntity | |
| { | |
| using var _ = UnityEngine.Pool.ListPool<TEntity>.Get(out List<TEntity> buffer); | |
| foreach (var entity in group.GetEntities(buffer)) | |
| yield return entity; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class LinqExtensions | |
| { | |
| public static IEnumerable<IEnumerable<T>> TakeCount<T>(this IEnumerable<T> source, int count) | |
| { | |
| if (source == null) | |
| throw new ArgumentNullException(nameof(source)); | |
| if (count < 0) | |
| throw new ArgumentOutOfRangeException(nameof(count), $"{nameof(count)} must be 0 or greater"); | |
| if (count > source.Count()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public enum Shape | |
| { | |
| Rock, | |
| Paper, | |
| Scissors | |
| } | |
| public class TuplePatterns : MonoBehaviour |