public void UseAction(Action action) { CatGraph.Node startNode = _graph.LocateNode(action, _currentMood); CatGraph.Node endNode = startNode.Transition; _delayedAction = () => DelayedAction(startNode, endNode); if (string.IsNullOrEmpty(startNode.MethodName) == false) { _catController.Invoke(startNode.MethodName, 0f); } }
private void DelayedAction(CatGraph.Node startNode, CatGraph.Node endNode) { _currentMood = endNode.Mood; _moodIndicator.SetMood(endNode.Mood); SetReactionText(startNode.Text); }