コード例 #1
0
 // Start is called before the first frame update
 void Awake()
 {
     dialog = GetComponent <DialogueTrigger>();
     data   = new DialogObjectData {
         hasBeenShown = dialog.DialogHasBeenShown,
         isActive     = gameObject.activeSelf
     }; //get/set
 }
コード例 #2
0
    public override void setLoadData(object obj)
    {
        if (dialog == null)
        {
            dialog = GetComponent <DialogueTrigger>();
        }

        data = (DialogObjectData)obj;
        dialog.DialogHasBeenShown = data.hasBeenShown;
        gameObject.SetActive(data.isActive);
        Debug.Log("data.hasBeenShown:" + data.hasBeenShown);
        Debug.Log("data.isActive:" + data.isActive);
    }