-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fab4bc0
commit 40b0629
Showing
9 changed files
with
213 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
VisualPinball.Unity/VisualPinball.Unity/Game/Engine/SerializedGamelogicEngineCoil.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Visual Pinball Engine | ||
// Copyright (C) 2023 freezy and VPE Team | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// ReSharper disable InconsistentNaming | ||
|
||
using System; | ||
using UnityEngine; | ||
using VisualPinball.Engine.Game.Engines; | ||
|
||
namespace VisualPinball.Unity | ||
{ | ||
[Serializable] | ||
public class SerializedGamelogicEngineCoil : GamelogicEngineCoil, ISerializationCallbackReceiver | ||
{ | ||
public SerializedGamelogicEngineCoil(string id) : base(id) { } | ||
public SerializedGamelogicEngineCoil(int id) : base(id) { } | ||
|
||
[SerializeField] private string _serializedDescription; | ||
[SerializeField] private string _serializedId; | ||
[SerializeField] private string _serializedDeviceHint; | ||
[SerializeField] private string _serializedDeviceItemHint; | ||
[SerializeField] private int _serializedNumMatches = 1; | ||
|
||
public void OnBeforeSerialize() | ||
{ | ||
_serializedDescription = _description; | ||
_serializedId = _id; | ||
_serializedDeviceHint = _deviceHint; | ||
_serializedDeviceItemHint = _deviceItemHint; | ||
_serializedNumMatches = _numMatches; | ||
} | ||
|
||
public void OnAfterDeserialize() | ||
{ | ||
_description = _serializedDescription; | ||
_id = _serializedId; | ||
_deviceHint = _serializedDeviceHint; | ||
_deviceItemHint = _serializedDeviceItemHint; | ||
_numMatches = _serializedNumMatches; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
VisualPinball.Unity/VisualPinball.Unity/Game/Engine/SerializedGamelogicEngineCoil.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
VisualPinball.Unity/VisualPinball.Unity/Game/Engine/SerializedGamelogicEngineLamp.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Visual Pinball Engine | ||
// Copyright (C) 2023 freezy and VPE Team | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// ReSharper disable InconsistentNaming | ||
|
||
using System; | ||
using UnityEngine; | ||
using VisualPinball.Engine.Game.Engines; | ||
|
||
namespace VisualPinball.Unity | ||
{ | ||
[Serializable] | ||
public class SerializedGamelogicEngineLamp : GamelogicEngineLamp, ISerializationCallbackReceiver | ||
{ | ||
public SerializedGamelogicEngineLamp(string id) : base(id) { } | ||
public SerializedGamelogicEngineLamp(int id) : base(id) { } | ||
|
||
[SerializeField] private string _serializedDescription; | ||
[SerializeField] private string _serializedId; | ||
[SerializeField] private string _serializedDeviceHint; | ||
[SerializeField] private string _serializedDeviceItemHint; | ||
[SerializeField] private int _serializedNumMatches = 1; | ||
|
||
public void OnBeforeSerialize() | ||
{ | ||
_serializedDescription = _description; | ||
_serializedId = _id; | ||
_serializedDeviceHint = _deviceHint; | ||
_serializedDeviceItemHint = _deviceItemHint; | ||
_serializedNumMatches = _numMatches; | ||
} | ||
|
||
public void OnAfterDeserialize() | ||
{ | ||
_description = _serializedDescription; | ||
_id = _serializedId; | ||
_deviceHint = _serializedDeviceHint; | ||
_deviceItemHint = _serializedDeviceItemHint; | ||
_numMatches = _serializedNumMatches; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
VisualPinball.Unity/VisualPinball.Unity/Game/Engine/SerializedGamelogicEngineLamp.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
VisualPinball.Unity/VisualPinball.Unity/Game/Engine/SerializedGamelogicEngineSwitch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Visual Pinball Engine | ||
// Copyright (C) 2023 freezy and VPE Team | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// ReSharper disable InconsistentNaming | ||
|
||
using System; | ||
using UnityEngine; | ||
using VisualPinball.Engine.Game.Engines; | ||
|
||
namespace VisualPinball.Unity | ||
{ | ||
[Serializable] | ||
public class SerializedGamelogicEngineSwitch : GamelogicEngineSwitch, ISerializationCallbackReceiver | ||
{ | ||
public SerializedGamelogicEngineSwitch(string id) : base(id) { } | ||
public SerializedGamelogicEngineSwitch(int id) : base(id) { } | ||
|
||
[SerializeField] private string _serializedDescription; | ||
[SerializeField] private string _serializedId; | ||
[SerializeField] private string _serializedDeviceHint; | ||
[SerializeField] private string _serializedDeviceItemHint; | ||
[SerializeField] private int _serializedNumMatches = 1; | ||
|
||
public void OnBeforeSerialize() | ||
{ | ||
_serializedDescription = _description; | ||
_serializedId = _id; | ||
_serializedDeviceHint = _deviceHint; | ||
_serializedDeviceItemHint = _deviceItemHint; | ||
_serializedNumMatches = _numMatches; | ||
} | ||
|
||
public void OnAfterDeserialize() | ||
{ | ||
_description = _serializedDescription; | ||
_id = _serializedId; | ||
_deviceHint = _serializedDeviceHint; | ||
_deviceItemHint = _serializedDeviceItemHint; | ||
_numMatches = _serializedNumMatches; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
VisualPinball.Unity/VisualPinball.Unity/Game/Engine/SerializedGamelogicEngineSwitch.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.