public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { switch ((Conditon)func.intParam0) { case Conditon.Direct: fight.SetForceClear(); break; case Conditon.Jump_Fall: if (fight.Jump_IsFall()) { fight.SetForceClear(); } break; case Conditon.Jump_Floor: if (fight.Jump_IsFloor()) { fight.SetForceClear(); /* Debug.Log("setzero!");*/ } break; default: break; } return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { WhenExit exit = (WhenExit)func.intParam0; bool active = false; if (exit == WhenExit.Direct) { active = true; } else if (exit == WhenExit.Jump_Fall && fight.Jump_IsFall()) { active = true; } else if (exit == WhenExit.Jump_Floor && fight.Jump_IsFloor()) { active = true; } else if (exit == WhenExit.Attack && fight.IsHit()) { active = true; } else if (exit == WhenExit.NotAttack && !fight.IsHit()) { active = true; } if (active) { fight.PlaySound(func.strParam0); return(true); } return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { //四个效果 //int0 dark screen //int1 焦点(镜头放大跟踪) //int2 暂停世界(除了我) //int3 摇晃摄像机 fight.WorldEffect(func.intParam0 > 0, func.intParam1 > 0, func.intParam2 > 0, func.intParam3 > 0); return(false); }
//public bool Init(IFightFSM fight, BlockFunc func) //{ // //fight.Turn(); // return false; //} public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { //限制功能激活时间 //if(func.activeFrameBegin<0||frameindex<func.activeFrameBegin)return false; //if(func.activeFrameEnd>=0&&frameindex>func.activeFrameEnd)return false; if (func.intParam1 == 1 && !fight.IsHit()) //是否攻击中 { // Debug.Log("false"); return(false); } fight.SetRepeatExit(func.strParam1, func.intParam0, func.intParam2); return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { fight.FlashBegin(new Color(func.vecParam0.x, func.vecParam0.y, func.vecParam0.z, func.vecParam0.z), func.intParam0, func.intParam1); ////FixInt("攻击可命中多少敌人", ref func.intParam0); ////FixInt("命中HitCount", ref func.intParam1); ////GUILayout.Space(10); ////FixString("攻击影响参数", ref func.strParam0); ////FixInt("攻击影响值", ref func.intParam2); ////GUILayout.Space(10); ////FixString("攻击导致对方状态", ref func.strParam1); ////if (func.activeFrameBegin < 0 || frameindex < func.activeFrameBegin) return false; ////if (func.activeFrameEnd >= 0 && frameindex > func.activeFrameEnd) return false; //fight.FE_AddHit(func.intParam0,func.intParam1,func.strParam0, func.intParam2, func.strParam1); return(false); }
//public bool Init(IFightFSM fight, BlockFunc func) //{ // //fight.Turn(); // return false; //} public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { ////限制功能激活时间,外部限制去 //if(func.activeFrameBegin<0||frameindex<func.activeFrameBegin)return false; //if(func.activeFrameEnd>=0&&frameindex>func.activeFrameEnd)return false; if (func.strParam0 == "byjoy") { fight.MoveByJoy(func.vecParam0.x); } else if (func.strParam0 == "byvec") { fight.Move(func.vecParam0.x, func.vecParam0.y, func.vecParam0.z); /* Debug.Log("move:" + func.vecParam0);*/ } return(false); }
//public bool Init(IFightFSM fight, BlockFunc func) //{ // //fight.Turn(); // return false; //} public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { //限制功能激活时间 //if(func.activeFrameBegin<0||frameindex<func.activeFrameBegin)return false; //if(func.activeFrameEnd>=0&&frameindex>func.activeFrameEnd)return false; if (func.intParam1 == 1 && !fight.IsHit()) //是否攻击中 { // Debug.Log("false"); return(false); } if (fight.TestCmd(func.strParam0, func.vecParam0.x)) { fight.ChangeBlock(func.strParam1, func.intParam0); /* Debug.Log("WantChangeBlock:" + func.strParam1 + "(" + func.intParam0 + ")");*/ return(true); } return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { //if (func.activeFrameBegin < 0 || frameindex < func.activeFrameBegin) return false; //if (func.activeFrameEnd >= 0 && frameindex > func.activeFrameEnd) return false; if (func.intParam0 == 1) { fight.SetForceClear(); } if (func.intParam1 == 1) { var dir = FBJoy2.g_joy.curState.dir; fight.AddForceSpeedWithoutCharDir(new Vector3(func.vecParam0.x * dir.x, 0, func.vecParam0.z * dir.y)); } else { fight.AddForceSpeed(func.vecParam0); /* Debug.Log("Force:" + func.vecParam0);*/ } return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { if (func.intParam3 == 1 && !fight.IsHit()) //是否攻击中 { // Debug.Log("false"); return(false); } bool active = false; int v = fight.GetProp(func.strParam0); int tv = func.intParam1; PropOp op = (PropOp)func.intParam2; if (op == PropOp.Add) { v += tv; fight.SetProp(func.strParam0, v); active = true; } else if (op == PropOp.Set) { v = tv; fight.SetProp(func.strParam0, v); active = true; } else if (op == PropOp.Eat && v >= tv) { v -= tv; fight.SetProp(func.strParam0, v); active = true; } if (active && !string.IsNullOrEmpty(func.strParam1)) { fight.ChangeBlock(func.strParam1, func.intParam0); return(true); } return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { bool active = false; int v = fight.GetProp(func.strParam0); int tv = func.intParam1; WhenExit when = (WhenExit)func.intParam2; if (when == WhenExit.Equal && v == tv) { active = true; } else if (when == WhenExit.Great && v > tv) { active = true; } else if (when == WhenExit.GreatEqual && v >= tv) { active = true; } else if (when == WhenExit.Less && v < tv) { active = true; } else if (when == WhenExit.LessEqual && v <= tv) { active = true; } else if (when == WhenExit.NotEqual && v != tv) { active = true; } if (active) { fight.ChangeBlock(func.strParam1, func.intParam0); return(true); } return(false); }
//public bool Init(IFightFSM fight, BlockFunc func) //{ // fight.Turn(); // return false; //} public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { fight.Turn(); return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { fight.SetBreakLevel(func.intParam0); return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { //增加抓握,和跟踪点 fight.FE_AddHit(func.intParam0, func.intParam1, func.strParam0, func.intParam2, func.strParam1, func.intParam3 > 0, func.intParam4 > 0); return(false); }
public bool Update(IFightFSM fight, BlockFunc func, int frameindex) { fight.CreateFlyItem(func.intParam0, func.intParam1, func.strParam0, func.vecParam0); return(false); }