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) { 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); }