Ejemplo n.º 1
0
        public void With_Should_return_EntitySetBuilder()
        {
            using World world = new World();

            EntitySetBuilder builder = world.GetEntities();

            Check.That(builder.WithEither <bool>().With <int>()).IsEqualTo(builder);
        }
Ejemplo n.º 2
0
        public void LinkTo(EntitySetBuilder builder)
        {
            Entity?entity = builder.AsSet().First();

            if (entity != null)
            {
                LinkTo((Entity)entity);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Makes a rule to obsverve <see cref="Entity"/> when at least one component of type <typeparamref name="T1"/> or <typeparamref name="T2"/> is removed.
 /// </summary>
 /// <typeparam name="T1">The first type of component.</typeparam>
 /// <typeparam name="T2">The second type of component.</typeparam>
 /// <param name="builder">The <see cref="EntitySetBuilder"/> on which to create the rule.</param>
 /// <returns>The given <see cref="EntitySetBuilder"/>.</returns>
 public static EntitySetBuilder WhenRemovedEither <T1, T2>(this EntitySetBuilder builder) => builder.WhenRemovedEither(typeof(T1), typeof(T2));
Ejemplo n.º 4
0
 /// <summary>
 /// Makes a rule to obsverve <see cref="Entity"/> when at least one component of type <typeparamref name="T1"/>, <typeparamref name="T2"/> or <typeparamref name="T3"/> is changed.
 /// </summary>
 /// <typeparam name="T1">The first type of component.</typeparam>
 /// <typeparam name="T2">The second type of component.</typeparam>
 /// <typeparam name="T3">The third type of component.</typeparam>
 /// <param name="builder">The <see cref="EntitySetBuilder"/> on which to create the rule.</param>
 /// <returns>The given <see cref="EntitySetBuilder"/>.</returns>
 public static EntitySetBuilder WhenChangedEither <T1, T2, T3>(this EntitySetBuilder builder) => builder.WhenChangedEither(typeof(T1), typeof(T2), typeof(T3));
Ejemplo n.º 5
0
 /// <summary>
 /// Makes a rule to obsverve <see cref="Entity"/> without at least one component of type <typeparamref name="T1"/>, <typeparamref name="T2"/> or <typeparamref name="T3"/>.
 /// </summary>
 /// <typeparam name="T1">The first type of component.</typeparam>
 /// <typeparam name="T2">The second type of component.</typeparam>
 /// <typeparam name="T3">The third type of component.</typeparam>
 /// <param name="builder">The <see cref="EntitySetBuilder"/> on which to create the rule.</param>
 /// <returns>The given <see cref="EntitySetBuilder"/>.</returns>
 public static EntitySetBuilder WithoutEither <T1, T2, T3>(this EntitySetBuilder builder) => builder.WithoutEither(typeof(T1), typeof(T2), typeof(T3));