File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 14
14
// You should have received a copy of the GNU General Public License
15
15
// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
17
+ using System ;
17
18
using UnityEngine ;
19
+ using VisualPinball . Engine . VPT ;
18
20
using VisualPinball . Unity ;
19
21
20
22
namespace VisualPinball . Engine . Unity . Hdrp
@@ -25,5 +27,20 @@ public GameObject CreateBumper()
25
27
{
26
28
return UnityEngine . Resources . Load < GameObject > ( "Prefabs/Bumper" ) ;
27
29
}
30
+ public GameObject CreateGate ( int type )
31
+ {
32
+ switch ( type ) {
33
+ case GateType . GateLongPlate :
34
+ return UnityEngine . Resources . Load < GameObject > ( "Prefabs/Gate - Long Plate" ) ;
35
+ case GateType . GatePlate :
36
+ return UnityEngine . Resources . Load < GameObject > ( "Prefabs/Gate - Plate" ) ;
37
+ case GateType . GateWireRectangle :
38
+ return UnityEngine . Resources . Load < GameObject > ( "Prefabs/Gate - Wire Rectangle" ) ;
39
+ case GateType . GateWireW :
40
+ return UnityEngine . Resources . Load < GameObject > ( "Prefabs/Gate - Wire W" ) ;
41
+ default :
42
+ throw new ArgumentException ( nameof ( type ) , $ "Unknown gate type { type } .") ;
43
+ }
44
+ }
28
45
}
29
46
}
You can’t perform that action at this time.
0 commit comments