35 lines
873 B
C#
35 lines
873 B
C#
using System;
|
|
using MotionFramework;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace DefaultNamespace
|
|
{
|
|
public class CharacterEquipBtOnClick : MonoBehaviour
|
|
{
|
|
private bool isChange = false;
|
|
|
|
public void Start()
|
|
{
|
|
this.GetComponent<Button>().onClick.AddListener(delegate
|
|
{
|
|
if (isChange)
|
|
{
|
|
isChange = false;
|
|
}
|
|
else
|
|
{
|
|
isChange = true;
|
|
}
|
|
|
|
CharacterEquipInfoManager.Instance.Equipment(this.name, isChange);
|
|
});
|
|
|
|
|
|
|
|
this.transform.Find("Texture").GetComponent<RawImage>().texture= MotionEngine.GetModule<ToolsPackManager>().GetToolsPackWindowBtImage(this.name);
|
|
|
|
|
|
}
|
|
}
|
|
} |