Beispiel #1
0
    public PlatformerAIAction FindActionByType(string actionTypeName)
    {
        PlatformerAIAction typeToReturn = null;

        Logger.Log(actionTypeName);

        typeToReturn = bossActions.Find(bossAction => bossAction.GetActionName() == actionTypeName);

        return(typeToReturn);
    }
Beispiel #2
0
    public void SwitchToNewAction(string newActionTypeName)
    {
        if (currentAction)
        {
            currentAction.FinishAction();
        }

        currentAction         = FindActionByType(newActionTypeName);
        currentActionTypeName = newActionTypeName.ToString();

        Logger.Log("switching to " + currentAction);
        currentAction.StartAction();
    }