public override bool Check() { AI = Entity.GetComponent <SwankAI>(); if (AI is null) { Debug.LogError($"{nameof(AI)} does not have a SwankAI"); return(true); } return(AI.IsDancing == false); }
public override TaskStatus OnUpdate() { AI = Entity.GetComponent <SwankAI>(); if (AI is null) { Debug.LogError($"{nameof(Entity)} is not a SwankAI"); return(TaskStatus.FAILED); } var IsDancing = AI.IsDancing; if (IsDancing == false) { IsDancing = AI.Dance(); } return(IsDancing ? TaskStatus.COMPLETED : TaskStatus.FAILED); }