You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.6 KiB
50 lines
1.6 KiB
using UnityEngine; |
|
using System.Collections; |
|
using UnityEngine.UI; |
|
using AX.TrackRecord; |
|
using System.Collections.Generic; |
|
using System; |
|
using AX.MessageSystem; |
|
|
|
public class NodePrefabController : MonoBehaviour { |
|
public int id = 0; |
|
public int FatherID; |
|
public string filename = ""; |
|
private GameObject GameLabel; |
|
public Toggle toggle; //复选框 |
|
public Button DeleteButton;//删除按钮 |
|
public Button EditButton;//编辑按钮 |
|
public string Intro = ""; |
|
private string DelName = "AskDeslectNode"; |
|
private string EditName = "NodeIntroShowWin"; |
|
|
|
void Start () |
|
{ |
|
if (!(ExamInfoHelpClass.loadSceneMode== ExamInfoHelpClass.LoadSceneMode.PrepareMode || |
|
ExamInfoHelpClass.loadSceneMode == ExamInfoHelpClass.LoadSceneMode.EditCourceware)) |
|
{ |
|
this.DeleteButton.gameObject.SetActive(false); |
|
this.EditButton.gameObject.SetActive(false); |
|
} |
|
toggle.group = this.transform.parent.GetComponent<ToggleGroup>(); |
|
this.DeleteButton.onClick.AddListener(DeleteNodeButton_Click); |
|
this.EditButton.onClick.AddListener(EditNodeButton_Click); |
|
this.toggle.onValueChanged.AddListener(ToggleChange); |
|
} |
|
void ToggleChange(bool check) |
|
{ |
|
|
|
} |
|
|
|
public void DeleteNodeButton_Click() |
|
{ |
|
NodeSet.Instance.GetMessageNode(this.gameObject); |
|
MessageDispatcher.SendMessage("OPEN", (object)DelName, "CUBE"); |
|
} |
|
public void EditNodeButton_Click() |
|
{ |
|
NodeSet.Instance.GetMessageNode(this.gameObject); |
|
MessageDispatcher.SendMessage("OPEN", (object)EditName, "CUBE"); |
|
} |
|
|
|
}
|
|
|