// Update is called once per frame void Update() { //Each frame the current state is executed and if a state transition is triggered //in the execution of the state the state is changed currentState = currentState.DoState(); currentStateName = currentState.ToString(); animateWalking(); }
private void SelectNPC(uint npcId) { currentNpc = GlobalData.resourcesManager.getById <NPCState> (npcId); if (currentNpc == null) { Debug.LogWarning("Current dialog npc is null!"); return; } Debug.Log("NPC selected: " + currentNpc.ToString()); npcNameText.text = currentNpc.getName(); }
public override string GetDebugInfo() { var script = shouldExecScript ? dialogueScript : "nothing"; return($"{npcName}\n talks: {talks.ToString()}\n execs: {script}\n state: {state.ToString()}"); }