AddActor() public method

public AddActor ( Actor actor ) : void
actor Actor
return void
Ejemplo n.º 1
0
        private void FillGroup(Group group, TextureContext texture)
        {
            float advance = 32 + Spacing;
            for (int y = 0; y < NumSprites * advance; y += (int)advance) {
                for (int x = 0; x < NumSprites * advance; x += (int)advance) {
                    Image img = new Image(new TextureRegion(texture)) {
                        Align = Alignment.Center,
                        Scaling = Scaling.None,
                    };
                    img.SetBounds(x, y, 32, 32);
                    img.SetOrigin(16, 16);

                    group.AddActor(img);
                    _images.Add(img);
                }
            }
        }