public void RemoveMoveFactor(bool ignoreCallback = false) { currentMovementPattern = null; if (moveId != null) { ennemyController.MoveCompiler.RemoveMoveFactor(localIdInFile, moveId, ignoreCallback); } }
// Update is called once per frame void Update() { if (ennemyController.IsInCombat && CanMove) { if (currentMovementPattern == null) { currentMovementPattern = DecideMovement(); currentMovementPattern.OnExecutionEnd = delegate() { currentMovementPattern = null; }; currentMovementPattern.Execute(); } } }