chunk 1: core gameplay scripts scenes runtime assets
This commit is contained in:
43
Assets/Scripts/Character Selection System/PlayerButton.cs
Normal file
43
Assets/Scripts/Character Selection System/PlayerButton.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.InputSystem;
|
||||
//using static UnityEditor.Experimental.GraphView.GraphView;
|
||||
|
||||
public class PlayerButton : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private bool isAvailable = true;
|
||||
public bool IsAvailable { get => isAvailable; set => isAvailable = value; }
|
||||
|
||||
[SerializeField] private Button button;
|
||||
|
||||
// Reference to the associated PlayerInput
|
||||
public PlayerInput playerInput;
|
||||
|
||||
// Reference to the associated InputDevice
|
||||
[HideInInspector] public InputDevice device;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
button = GetComponent<Button>();
|
||||
playerInput = GetComponent<PlayerInput>();
|
||||
}
|
||||
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/*player1 = PlayerInput.Instantiate(playerPrefab, controlScheme: "Arrows", pairWithDevice: Keyboard.current);
|
||||
player2 = PlayerInput.Instantiate(playerPrefab, controlScheme: "WASD", pairWithDevice: Keyboard.current);*/
|
||||
|
||||
Reference in New Issue
Block a user