示例#1
0
        public PlayerAnimationProvider(UxContext uxContext, int playerRadius)
        {
            Texture = uxContext.GetTexture("player-texture.png");
            var playerDiameter = playerRadius * 2;

            MaskTexture = Masks.GetCircleMask(playerRadius);
            TextureRect = new SDL_Rect {
                x = 0, y = 0, w = playerDiameter, h = playerDiameter
            };
            OutputSize = new Size(TextureRect.w, TextureRect.h);
            NonRepeatingTextureSize = 64 - TextureRect.w;
        }