Capture transition between lines
Is there a way to know when a transition between two lines of the played Naninovel script has happened through c# scripts?
Is there a way to know when a transition between two lines of the played Naninovel script has happened through c# scripts?
Try OnCommand events of IScriptPlayer
engine service.
How do I use this event? I've seen a video talking about but I don't know how to declare it
This is my code for reference:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LifeSystem : MonoBehaviour
{
int lifePoints = 90;
public string label;
DirectorScript directorScript;
Slider slider;
void Start()
{
directorScript = FindObjectOfType<DirectorScript>();
slider = gameObject.GetComponent<Slider>();
}
void Update()
{
slider.value = lifePoints;
directorScript.scriptPlayer.OnCommandExecutionFinish;
}
}
Check out C# tutorials on how to work with events; there is nothing special here on Naninovel side.