public override ILineObject Generate(GenerationEnvironment env) { var ret = ThisExpr.Instance.MakeIndex("SetMotion").Call( ThisExpr.Instance.MakeIndex("motion"), new BiOpExpr(ThisExpr.Instance.MakeIndex("keyTake"), new ConstNumberExpr(1), BiOpExpr.Op.Add) ).Statement(); return(SetMotionEffectHelper.Generate(env, ret)); }
public override ILineObject Generate(GenerationEnvironment env) { var id = env.GetActionID(Animation); var segment = new BiOpExpr(ThisExpr.Instance.MakeIndex("rand").Call(), new ConstNumberExpr(SegmentCount), BiOpExpr.Op.Mod); var ret = ThisExpr.Instance.MakeIndex("SetMotion").Call(new ConstNumberExpr(id), segment).Statement(); return(SetMotionEffectHelper.Generate(env, ret)); }