23 lines
638 B
C#
23 lines
638 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class JPB_EditingFieldBehaviour : MonoBehaviour
|
|
{
|
|
public int idField;
|
|
public InputField thisField;
|
|
|
|
private void Awake()
|
|
{
|
|
thisField = gameObject.GetComponentInChildren<InputField>();
|
|
thisField.onValueChanged.AddListener(delegate { UpdateTeam(); });
|
|
}
|
|
|
|
public void UpdateTeam()
|
|
{
|
|
JPB_TeamController.instance.teams[idField].teamName = thisField.text;
|
|
JPB_TeamController.instance.teams[idField].assignedPanel.GetComponentInChildren<Text>().text = thisField.text;
|
|
}
|
|
}
|