|
部分代码
function checkExecutableSkill_BloodRiven(obj)
{
if(!obj) return false;
local b_useskill = obj.sq_IsUseSkill(SKILL_BLOODRIVEN);
if(b_useskill)
{
obj.sq_IntVectClear();
obj.sq_IntVectPush(0); // substate세팅
obj.sq_AddSetStatePacket(STATE_BLOODRIVEN, STATE_PRIORITY_IGNORE_FORCE, true);
return true;
}
return false;
}
function checkCommandEnable_BloodRiven(obj)
{
if(!obj) return false;
local state = obj.sq_GetState();
return true;
}
function onSetState_BloodRiven(obj, state, datas, isResetTimer)//接受到 发送“STATE_ZSKILL00”状态 时,触发内容;
{
if(!obj) return;
local substate = obj.sq_GetVectorData(datas, 0);
obj.setSkillSubState(substate);
if(substate == 0)
{
obj.sq_StopMove();//停止角色的移动
obj.sq_SetCurrentAnimation(CUSTOM_ANI_BLOODRIVEN_1);//设置角色使用(CUSTOM_ANI_01)指向的ANI动作
}
else if(substate == 1)
{
obj.sq_SetCurrentAnimation(CUSTOM_ANI_BLOODRIVEN_2);
}
else if(substate == 2)
{
obj.sq_SetCurrentAnimation(CUSTOM_ANI_BLOODRIVEN_3);
}
else if(substate == 3)
{
obj.sq_SetCurrentAnimation(CUSTOM_ANI_BLOODRIVEN_4);
}
else if(substate == 4)
{
obj.sq_SetCurrentAnimation(CUSTOM_ANI_BLOODRIVEN_);
}
}
function onEndCurrentAni_BloodRiven(obj)
{
if(!obj) return;
local substate = obj.getSkillSubState();
if(substate == 0) {
obj.sq_IntVectClear();
obj.sq_IntVectPush(1); // substate세팅
obj.sq_AddSetStatePacket(STATE_BLOODRIVEN, STATE_PRIORITY_IGNORE_FORCE, true);
}
else if(substate == 2) {
obj.sq_IntVectClear();
obj.sq_IntVectPush(3); // substate세팅
obj.sq_AddSetStatePacket(STATE_BLOODRIVEN, STATE_PRIORITY_IGNORE_FORCE, true);
}
else if(substate == 3) {
obj.sq_IntVectClear();
obj.sq_IntVectPush(4); // substate세팅
obj.sq_AddSetStatePacket(STATE_BLOODRIVEN, STATE_PRIORITY_IGNORE_FORCE, true);
}
else if(substate == 4) {
obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_USER, true);//演出结束后,恢复站立。
}
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|