public void UpdateData(BlockData blockData) { var blockSetup = BlockVisualHelper.GetVisualSetup(blockData); _sprite.UpdateSprite(BlockVisualHelper.GenerateSpriteName(Type, blockSetup)); _sprite.Angle = (float)blockSetup.Angle; }
public void Setup(BlockData blockData, float x, float y, BlockType blockType) { Data = blockData; Type = blockType; IsEnabled = true; X = x; Y = y; var blockSetup = BlockVisualHelper.GetVisualSetup(blockData); _sprite.UpdateSprite(BlockVisualHelper.GenerateSpriteName(blockType, blockSetup)); _sprite.Angle = (float)blockSetup.Angle; }