behavior3行为树
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 

24 行
600 B

%%%-------------------------------------------------------------------
%%% @author DY
%%% @copyright (C) 2020, <COMPANY>
%%% @doc
%%% 判断怒气值是否已满
%%% 已满:SUCCESS
%%% 未满:FAILURE
%%% @end
%%% Created : 07. 10月 2020 15:18
%%%-------------------------------------------------------------------
-module(cond_is_rage_full).
-include("eBhv3.hrl").
-include("example.hrl").
%% API
-export([tick/2]).
tick(_BTree, #{cur_rage := CurRage} = State) ->
case CurRage >= ?MAX_RAGE of
true ->
{?BT_SUCCESS, State};
false ->
{?BT_FAILURE, State}
end.