27 lines
644 B
C#
27 lines
644 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Deviceinformation : MonoBehaviour
|
|
{
|
|
public Text weapon_text;//武器名称
|
|
public InputField number_input;//输入的个数
|
|
public Toggle Options_toggle;//是否勾选状态
|
|
|
|
public void Weapon(string name,string number, Action cation)
|
|
{
|
|
weapon_text.text = name;
|
|
number_input.text = number;
|
|
Options_toggle.onValueChanged.AddListener((iosn) =>
|
|
{
|
|
if (iosn)
|
|
{
|
|
cation?.Invoke();
|
|
}
|
|
});
|
|
|
|
}
|
|
}
|