コード例 #1
0
 private void setDefaultEquipmentValues(DecalMaterialProperties[] defaultDecalMaterials)
 {
     itemModel.SetChannelFabric(itemModel.RedChannel, null, Vector2.zero);
     itemModel.SetChannelFabric(itemModel.GreenChannel, null, Vector2.zero);
     itemModel.SetChannelFabric(itemModel.BlueChannel, null, Vector2.zero);
     if (defaultDecalMaterials != null)
     {
         for (int i = 0; i < defaultDecalMaterials.Length; i++)
         {
             DecalMaterialProperties decalMaterialProperties = defaultDecalMaterials[i];
             DecalColorChannel       decalColorChannel       = (DecalColorChannel)i;
             EquipmentShaderUtils.ApplyDecalScale(decalColorChannel, decalMaterialProperties.Scale, currentEquipmentRenderers);
             EquipmentShaderUtils.ApplyDecalRotation(decalColorChannel, decalMaterialProperties.RotationRads, currentEquipmentRenderers);
         }
     }
     else
     {
         Log.LogErrorFormatted(this, "Default Decal Materals were null and not applied.");
     }
 }
コード例 #2
0
 private bool onDecalRotated(CustomizerModelEvents.DecalRotatedEvent evt)
 {
     EquipmentShaderUtils.ApplyDecalRotation(evt.DecalLayer.ShaderChannel, evt.TotalRotation, currentEquipmentRenderers);
     return(false);
 }