behavior3行为树
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 

20 lignes
568 B

%%%-------------------------------------------------------------------
%%% @author DY
%%% @copyright (C) 2020, <COMPANY>
%%% @doc
%%% 变为空闲状态
%%% 返回:SUCCESS
%%% @end
%%% Created : 07. 10月 2020 15:13
%%%-------------------------------------------------------------------
-module(action_become_idle).
-include("eBhv3.hrl").
-include("example.hrl").
%% API
-export([tick/2]).
tick(_BTree, State) ->
State1 = State#{cur_state := ?SET_STATE(?STATE_TYPE_IDLE)},
?INFO("~ts:变为空闲状态", [maps:get(uid, State1)]),
{?BT_SUCCESS, State1}.