30 lines
809 B
C#
30 lines
809 B
C#
using UnityEngine;
|
|
|
|
public class CharacterSelectionButtonScript : MonoBehaviour
|
|
{
|
|
public GameObject characterSelectionManager;
|
|
|
|
public string button;
|
|
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
Debug.Log(characterSelectionManager);
|
|
Debug.Log(characterSelectionManager.GetComponent<CharacterSelectionScript>());
|
|
}
|
|
void OnMouseDown()
|
|
{
|
|
if (button == "right")
|
|
{
|
|
Debug.Log(button);
|
|
characterSelectionManager.GetComponent<CharacterSelectionScript>().CycleRight();
|
|
}
|
|
if (button == "left")
|
|
{
|
|
Debug.Log(button);
|
|
characterSelectionManager.GetComponent<CharacterSelectionScript>().CycleLeft();
|
|
}
|
|
}
|
|
}
|
|
|