Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VisualPinball.Engine/Game/Engines/GamelogicEngineCoil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace VisualPinball.Engine.Game.Engines
{
public struct GamelogicEngineCoil
public class GamelogicEngineCoil
{
public string Id;
public string Description;
Expand Down
2 changes: 1 addition & 1 deletion VisualPinball.Engine/Game/Engines/GamelogicEngineSwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace VisualPinball.Engine.Game.Engines
{
public struct GamelogicEngineSwitch
public class GamelogicEngineSwitch
{
public string Id;
public string Description;
Expand Down
12 changes: 6 additions & 6 deletions VisualPinball.Engine/VPT/Mappings/Mappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void PopulateSwitches(GamelogicEngineSwitch[] engineSwitches, IEnumerable
var source = GuessSwitchSource(engineSwitch);
var playfieldItem = source == SwitchSource.Playfield ? GuessPlayfieldSwitch(switches, engineSwitch) : null;
var device = source == SwitchSource.Device ? GuessDevice(switchDevices, engineSwitch) : null;
var deviceItem = source == SwitchSource.Device && device != null ? GuessDeviceSwitch(engineSwitch, device) : default;
var deviceItem = source == SwitchSource.Device && device != null ? GuessDeviceSwitch(engineSwitch, device) : null;
var inputActionMap = source == SwitchSource.InputSystem
? string.IsNullOrEmpty(engineSwitch.InputMapHint) ? InputConstants.MapCabinetSwitches : engineSwitch.InputMapHint
: string.Empty;
Expand All @@ -88,7 +88,7 @@ public void PopulateSwitches(GamelogicEngineSwitch[] engineSwitches, IEnumerable
InputActionMap = inputActionMap,
InputAction = inputAction,
Device = device != null ? device.Name : string.Empty,
DeviceItem = deviceItem.Id
DeviceItem = deviceItem != null ? deviceItem.Id : string.Empty
});
}
}
Expand Down Expand Up @@ -175,7 +175,7 @@ private static GamelogicEngineSwitch GuessDeviceSwitch(GamelogicEngineSwitch eng
}
}
}
return default;
return null;
}

#endregion
Expand Down Expand Up @@ -215,15 +215,15 @@ public void PopulateCoils(GamelogicEngineCoil[] engineCoils, IEnumerable<ICoilab
var description = string.IsNullOrEmpty(engineCoil.Description) ? string.Empty : engineCoil.Description;
var playfieldItem = destination == CoilDestination.Playfield ? GuessPlayfieldCoil(coils, engineCoil) : null;
var device = destination == CoilDestination.Device ? GuessDevice(coilDevices, engineCoil) : null;
var deviceItem = destination == CoilDestination.Device && device != null ? GuessDeviceCoil(engineCoil, device) : default;
var deviceItem = destination == CoilDestination.Device && device != null ? GuessDeviceCoil(engineCoil, device) : null;

Data.AddCoil(new MappingsCoilData {
Id = engineCoil.Id,
Description = description,
Destination = destination,
PlayfieldItem = playfieldItem != null ? playfieldItem.Name : string.Empty,
Device = device != null ? device.Name : string.Empty,
DeviceItem = deviceItem.Id,
DeviceItem = deviceItem != null ? deviceItem.Id : string.Empty,
Type = CoilType.SingleWound
});
}
Expand Down Expand Up @@ -277,7 +277,7 @@ private static GamelogicEngineCoil GuessDeviceCoil(GamelogicEngineCoil engineCoi
}
}
}
return default;
return null;
}

/// <summary>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions VisualPinball.Unity/Assets/Materials/DefaultBall.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DefaultBall
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: f9cf0be10d18f504382975efa980b1b6, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0.5
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
8 changes: 8 additions & 0 deletions VisualPinball.Unity/Assets/Materials/DefaultBall.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 83 additions & 0 deletions VisualPinball.Unity/Assets/Resources/Prefabs/DefaultBall.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8289283333368007096
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3881672604355561253}
- component: {fileID: 6075728238804368159}
- component: {fileID: 5180081487853661404}
m_Layer: 0
m_Name: DefaultBall
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3881672604355561253
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8289283333368007096}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6075728238804368159
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8289283333368007096}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5180081487853661404
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8289283333368007096}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 6eb0d5d325d217242a1ec1ecd5aae780, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added VisualPinball.Unity/Assets/Textures/BallDebug.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions VisualPinball.Unity/Assets/Textures/BallDebug.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading