Cleanup of abandoned saving code

This commit is contained in:
2021-01-01 14:28:30 -08:00
parent e069f85e56
commit 7b9ed99325
7 changed files with 9 additions and 122 deletions

View File

@ -95,7 +95,7 @@ namespace ConformalDecals.MaterialProperties {
var property = MaterialProperty.Instantiate(_serializedProperties[i]);
_materialProperties.Add(_serializedNames[i], property);
if (property is MaterialTextureProperty textureProperty && textureProperty.isMain) {
if (property is MaterialTextureProperty {isMain: true} textureProperty) {
_mainTexture = textureProperty;
}
}
@ -214,7 +214,7 @@ namespace ConformalDecals.MaterialProperties {
var newProperty = AddOrGetProperty<T>(propertyName);
newProperty.ParseNode(node);
if (newProperty is MaterialTextureProperty textureProperty && textureProperty.isMain) {
if (newProperty is MaterialTextureProperty {isMain: true} textureProperty) {
_mainTexture = textureProperty;
}
@ -252,7 +252,7 @@ namespace ConformalDecals.MaterialProperties {
public void UpdateScale(Vector2 scale) {
foreach (var entry in _materialProperties) {
if (entry.Value is MaterialTextureProperty textureProperty && textureProperty.autoScale) {
if (entry.Value is MaterialTextureProperty {autoScale: true} textureProperty) {
textureProperty.SetScale(scale);
}
}
@ -263,7 +263,7 @@ namespace ConformalDecals.MaterialProperties {
var mainTexSize = _mainTexture.Dimensions;
foreach (var entry in _materialProperties) {
if (entry.Value is MaterialTextureProperty textureProperty && textureProperty.autoTile) {
if (entry.Value is MaterialTextureProperty {autoTile: true} textureProperty) {
textureProperty.SetTile(tile, mainTexSize);
}
}