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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace VisualPinball.Unity
[AddComponentMenu("Pinball/Sound/Coil Sound")]
public class CoilSoundComponent : BinaryEventSoundComponent<IApiCoil, NoIdCoilEventArgs>, IPackable
{
[HideInInspector]
public string CoilName;

public override Type GetRequiredType() => typeof(ICoilDeviceComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace VisualPinball.Unity
[AddComponentMenu("Pinball/Sound/Switch Sound")]
public class SwitchSoundComponent : BinaryEventSoundComponent<IApiSwitch, SwitchEventArgs>, IPackable
{
[HideInInspector]
public string SwitchName;

public override Type GetRequiredType() => typeof(ISwitchDeviceComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ void IApiCoil.OnCoil(bool enabled)
BumperCollider.PushBallAway(ref ballState, in bumperState.Static, ref collEvent, in physicsMaterialData, ref state);
}
}

CoilStatusChanged?.Invoke(this, new NoIdCoilEventArgs(enabled));
}

void IApiWireDest.OnChange(bool enabled) => (this as IApiCoil).OnCoil(enabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public void UnpackReferences(byte[] data, Transform root, PackagedRefs refs, Pac
public const float DataMeshScale = 100f;

public const string SocketSwitchItem = "socket_switch";
public const string RingCoilItem = "ring_coil";

#endregion

Expand Down Expand Up @@ -144,7 +145,7 @@ private void Start()
public SwitchDefault SwitchDefault => SwitchDefault.Configurable;

public IEnumerable<GamelogicEngineCoil> AvailableCoils => new[] {
new GamelogicEngineCoil(name) {
new GamelogicEngineCoil(RingCoilItem) {
Description = "Ring Coil"
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// ReSharper disable CompareOfFloatsByEqualityOperator

using Unity.Mathematics;
using VisualPinball.Engine.Math;
using VisualPinball.Engine.VPT.Surface;

namespace VisualPinball.Unity
Expand All @@ -34,7 +35,8 @@ public SurfaceColliderGenerator(SurfaceApi surfaceApi, SurfaceComponent componen

var data = new SurfaceData();
component.CopyDataTo(data, null, null, false);
_meshGen = new SurfaceMeshGenerator(data);
var pos = new Vertex3D(matrix.c3.x, matrix.c3.y, matrix.c3.z);
_meshGen = new SurfaceMeshGenerator(data, pos);
}

internal void GenerateColliders(ref ColliderReference colliders)
Expand Down