Exemple #1
0
        public void UpdateData(BlockData blockData)
        {
            var blockSetup = BlockVisualHelper.GetVisualSetup(blockData);

            _sprite.UpdateSprite(BlockVisualHelper.GenerateSpriteName(Type, blockSetup));
            _sprite.Angle = (float)blockSetup.Angle;
        }
Exemple #2
0
        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;
        }