public PlatformerAIAction FindActionByType(string actionTypeName) { PlatformerAIAction typeToReturn = null; Logger.Log(actionTypeName); typeToReturn = bossActions.Find(bossAction => bossAction.GetActionName() == actionTypeName); return(typeToReturn); }
public void SwitchToNewAction(string newActionTypeName) { if (currentAction) { currentAction.FinishAction(); } currentAction = FindActionByType(newActionTypeName); currentActionTypeName = newActionTypeName.ToString(); Logger.Log("switching to " + currentAction); currentAction.StartAction(); }