35 lines
990 B
C#
35 lines
990 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ButtonsBlock : MonoBehaviour
|
|
{
|
|
[SerializeField] GameObject left1;
|
|
[SerializeField] GameObject right1;
|
|
[SerializeField] GameObject left2;
|
|
[SerializeField] GameObject right2;
|
|
|
|
public void SetupBlock(List<ButtonPinMapping> buttons)
|
|
{
|
|
left1.SetActive(false);
|
|
right1.SetActive(false);
|
|
left2.SetActive(false);
|
|
right2.SetActive(false);
|
|
|
|
foreach (var button in buttons)
|
|
{
|
|
switch (button)
|
|
{
|
|
case ButtonPinMapping.left1:
|
|
left1.SetActive(true); break;
|
|
case ButtonPinMapping.right1:
|
|
right1.SetActive(true); break;
|
|
case ButtonPinMapping.left2:
|
|
left2.SetActive(true); break;
|
|
case ButtonPinMapping.right2:
|
|
right2.SetActive(true); break;
|
|
}
|
|
}
|
|
}
|
|
}
|