예제 #1
0
 public BoundsSystem(Context context, GameWindow window)
 {
     this.context = context;
     this.window  = window;
     matcher      = new ComponentMatcher();
     matcher.All(typeof(VelocityComponent));
 }
예제 #2
0
        public MovementSystem(Context context)
        {
            this.context = context;

            matcher = new ComponentMatcher();
            matcher.All(typeof(VelocityComponent), typeof(TransformComponent));
        }
예제 #3
0
    public ComponentBufferSparse(int bufferIndex, IMappedBuffer entitiesBuffer, int initialSize = 1 << 10)
    {
        buffer_ = new MappedBufferSparse <T>(entitiesBuffer, initialSize);
        EntFlags flag = 1u << bufferIndex;

        Matcher = new ComponentMatcher(flag);
        Sparse  = true;
    }
예제 #4
0
    public ComponentBufferDense(int bufferIndex, int initialSize = 1 << 10)
    {
        buffer_ = new MappedBufferDense <EntIdx, T>();
        EntFlags flag = 1u << bufferIndex;

        Matcher = new ComponentMatcher(flag);
        Sparse  = false;
    }
예제 #5
0
        public CollisionSystem(Context context, int windowWidth, int windowHeight)
        {
            this.context      = context;
            this.windowWidth  = windowWidth;
            this.windowHeight = windowHeight;

            colliderMatcher = new ComponentMatcher();
            colliderMatcher.All(typeof(ColliderComponent));
        }
예제 #6
0
        public RenderSystem(GraphicsDevice graphicsDevice, Context context)
        {
            this.graphicsDevice = graphicsDevice;
            this.context        = context;

            spriteBatch = new SpriteBatch(graphicsDevice);

            matcher = new ComponentMatcher();
            matcher.All(typeof(SpriteComponent));
        }
예제 #7
0
 public InputSystem(Context context)
 {
     this.context = context;
     matcher      = new ComponentMatcher();
     matcher.All(typeof(PlayerControllerComponent), typeof(VelocityComponent));
 }