diff --git a/README-RU.md b/README-RU.md index 455e117..9de693a 100644 --- a/README-RU.md +++ b/README-RU.md @@ -579,7 +579,7 @@ public class Transform : ITransform public Vector3 Position { get; set; } // ... } -public class Rigidbody : ITransform +public class Rigidbody : Transform { public Vector3 Position { get; set; } public float Mass { get; set; } @@ -592,6 +592,16 @@ public class Camera : ITransform } // ... +pubcli TransformAspect : EcsAspect +{ + public EcsPool transforms; + public Aspect(Builder b) + { + transforms = b.Include(); + } +} +// ... + EcsWorld _world; Rigidbody _rigidbody; // ... @@ -610,6 +620,9 @@ Rigidbody rigidbody = _world.GetPool().Get(entity); //Исключение - отсутсвует компонент. Camera не является наследником или наследуемым классом для _rigidbody. Camera camera = _world.GetPool().Get(entity); +//Вернет True. +bool isMatches = _world.GetAspect().IsMatches(entity); + //Все эти строчки вернут True. bool isITransform = _world.GetPool().Has(entity); bool isTransform = _world.GetPool().Has(entity);