MegaMan.LevelEditor.SpriteEditor.InitSprite C# (CSharp) Метод

InitSprite() приватный Метод

private InitSprite ( int width, int height ) : void
width int
height int
Результат void
        private void InitSprite(int width, int height)
        {
            string sheetpath = null;
            if (Sprite != null && Sprite.SheetPath != null) sheetpath = Sprite.SheetPath.Absolute;

            Sprite = new Sprite(width, height);
            spriteWidth = width;
            spriteHeight = height;
            if (sheetpath != null) Sprite.SheetPath = FilePath.FromAbsolute(sheetpath, project.BaseDir);

            frameTotalLabel.Text = "of " + Sprite.Count.ToString();
            currentFrame.Minimum = 1;
            currentFrame.Maximum = Sprite.Count;
            duration.Value = 0;

            textWidth.Text = Sprite.Width.ToString();
            textHeight.Text = Sprite.Height.ToString();

            InitPreview();

            Sprite.Play();

            if (SpriteChange != null) SpriteChange();
        }