From bfe60eece6e03c2c4decea81e42548b46b48ca75 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:51:35 +0800 Subject: [PATCH] Update README-RU.md --- README-RU.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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);