/// <summary> /// 开关操作 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="id">要操作的开关id</param> /// <param name="dash">目标状态</param> public EditSwitchCommand(int line, int indent, RunnablePackage parent, string id, string dash) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, id))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("dash", new KeyValuePair <ArgType, string>(ArgType.Arg_dash, dash))); base.Init(hal, ActionPackageType.act_switch); }
/// <summary> /// 播放BGM /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="filename">BGM资源名</param> /// <param name="vol">音量</param> public BGMCommand(int line, int indent, RunnablePackage parent, string filename, string vol) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("filename", new KeyValuePair <ArgType, string>(ArgType.Arg_filename, filename))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("vol", new KeyValuePair <ArgType, string>(ArgType.Arg_vol, vol))); base.Init(hal, ActionPackageType.act_bgm); }
/// <summary> /// 播放Vocal /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="name">Vocal所属的角色名</param> /// <param name="vid">语音文件的id号</param> public VocalCommand(int line, int indent, RunnablePackage parent, string name, string vid) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("name", new KeyValuePair <ArgType, string>(ArgType.Arg_name, name))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("vid", new KeyValuePair <ArgType, string>(ArgType.Arg_vid, vid))); base.Init(hal, ActionPackageType.act_vocal); }
/// <summary> /// 函数调用 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="funCallName">函数名</param> /// <param name="args">实参列表</param> public EditFuncallCommand(int line, int indent, RunnablePackage parent, string funCallName, string args) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("name", new KeyValuePair <ArgType, string>(ArgType.Arg_name, funCallName))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("sign", new KeyValuePair <ArgType, string>(ArgType.Arg_sign, args))); base.Init(hal, ActionPackageType.act_call); }
/// <summary> /// 修改文本层属性 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="id">目标层</param> /// <param name="target">目标属性</param> /// <param name="dash">目标值</param> public MsgLayerOptCommand(int line, int indent, RunnablePackage parent, string id, string target, string dash) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, id))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("target", new KeyValuePair <ArgType, string>(ArgType.Arg_target, target))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("dash", new KeyValuePair <ArgType, string>(ArgType.Arg_dash, dash))); base.Init(hal, ActionPackageType.act_msglayeropt); }
/// <summary> /// 跳转 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="filename">目标场景名</param> /// <param name="target">目标标签名</param> /// <param name="cond">条件</param> public JumpCommand(int line, int indent, RunnablePackage parent, string filename, string target, string cond) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("filename", new KeyValuePair <ArgType, string>(ArgType.Arg_filename, filename))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("target", new KeyValuePair <ArgType, string>(ArgType.Arg_target, target))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("cond", new KeyValuePair <ArgType, string>(ArgType.Arg_cond, cond))); base.Init(hal, ActionPackageType.act_jump); }
/// <summary> /// 变量操作 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="operandLeft">左操作数</param> /// <param name="operateMode">操作符</param> /// <param name="operandRight">右操作数</param> public VarCommand(int line, int indent, RunnablePackage parent, string operandLeft, string operateMode, string operandRight) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("opLeft", new KeyValuePair <ArgType, string>(ArgType.unknown, operandLeft))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("op", new KeyValuePair <ArgType, string>(ArgType.unknown, operateMode))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("opRight", new KeyValuePair <ArgType, string>(ArgType.unknown, operandRight))); base.Init(hal, ActionPackageType.act_var); }
/// <summary> /// 显示背景 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="id">背景层id</param> /// <param name="filename">资源文件名</param> /// <param name="ro">3D世界深度</param> public EditBgCommand(int line, int indent, RunnablePackage parent, string id, string filename, string ro) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, id))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("ro", new KeyValuePair <ArgType, string>(ArgType.Arg_ro, ro))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("filename", new KeyValuePair <ArgType, string>(ArgType.Arg_filename, filename))); base.Init(hal, ActionPackageType.act_bg); }
/// <summary> /// 场景镜头动画 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="name">命令名</param> /// <param name="r">作用横向块编号</param> /// <param name="c">作用纵向块编号</param> /// <param name="ro">缩放比</param> public SCameraCommand(int line, int indent, RunnablePackage parent, string name, string r, string c, string ro) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("name", new KeyValuePair <ArgType, string>(ArgType.Arg_name, name))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("x", new KeyValuePair <ArgType, string>(ArgType.Arg_x, r))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("y", new KeyValuePair <ArgType, string>(ArgType.Arg_y, c))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("ro", new KeyValuePair <ArgType, string>(ArgType.Arg_ro, ro))); base.Init(hal, ActionPackageType.act_scamera); }
/// <summary> /// 变更状态 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="name">目标角色的名字</param> /// <param name="face">目标立绘表情</param> /// <param name="loc">目标例会位置</param> /// <param name="vid">目标语音</param> public EditACommand(int line, int indent, RunnablePackage parent, string name, string face, string loc, string vid) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("name", new KeyValuePair <ArgType, string>(ArgType.Arg_name, name))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("face", new KeyValuePair <ArgType, string>(ArgType.Arg_face, face))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("loc", new KeyValuePair <ArgType, string>(ArgType.Arg_loc, loc))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("vid", new KeyValuePair <ArgType, string>(ArgType.Arg_vid, vid))); base.Init(hal, ActionPackageType.act_a); }
/// <summary> /// 直接描绘文本 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="dialog">对话的内容</param> public DrawCommand(int line, int indent, RunnablePackage parent, string dialog) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("dash", new KeyValuePair <ArgType, string>(ArgType.Arg_dash, dialog))); base.Init(hal, ActionPackageType.act_draw); }
/// <summary> /// 删除立绘 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="id">要删除的立绘id</param> public DeletestandCommand(int line, int indent, RunnablePackage parent, string id) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, id))); base.Init(hal, ActionPackageType.act_deletecstand); }
/// <summary> /// 变更文字层 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="toId">目标层</param> public MsgLayerCommand(int line, int indent, RunnablePackage parent, string toId) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, toId))); base.Init(hal, ActionPackageType.act_msglayer); }
/// <summary> /// 过渡 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="type">过渡类型名</param> public TransCommand(int line, int indent, RunnablePackage parent, string type) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("name", new KeyValuePair <ArgType, string>(ArgType.Arg_name, type))); base.Init(hal, ActionPackageType.act_trans); }
/// <summary> /// 显示对话 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="span">等待的时长</param> public WaitCommand(int line, int indent, RunnablePackage parent, string span) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("time", new KeyValuePair <ArgType, string>(ArgType.Arg_time, span))); base.Init(hal, ActionPackageType.act_wait); }
/// <summary> /// 注释 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="context">内容</param> public EditNotationCommand(int line, int indent, RunnablePackage parent, string context) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("context", new KeyValuePair <ArgType, string>(ArgType.unknown, context))); base.Init(hal, ActionPackageType.notation); }
/// <summary> /// 显示对话 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="dialog">对话的内容</param> public DialogCommand(int line, int indent, RunnablePackage parent, string dialog) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("context", new KeyValuePair <ArgType, string>(ArgType.unknown, dialog))); base.Init(hal, ActionPackageType.act_dialog); }
/// <summary> /// 显示背景 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="id">按钮id</param> /// <param name="x">按钮X坐标</param> /// <param name="y">按钮Y坐标</param> /// <param name="target">处理标签</param> /// <param name="type">按钮类型</param> /// <param name="normal">正常图</param> /// <param name="over">悬停图</param> /// <param name="on">按下图</param> public EditButtonCommand(int line, int indent, RunnablePackage parent, string id, string x, string y, string target, string type, string normal, string over, string on) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, id))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("x", new KeyValuePair <ArgType, string>(ArgType.Arg_x, x))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("y", new KeyValuePair <ArgType, string>(ArgType.Arg_y, y))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("target", new KeyValuePair <ArgType, string>(ArgType.Arg_target, target))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("type", new KeyValuePair <ArgType, string>(ArgType.Arg_type, type))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("normal", new KeyValuePair <ArgType, string>(ArgType.Arg_normal, normal))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("over", new KeyValuePair <ArgType, string>(ArgType.Arg_over, over))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("on", new KeyValuePair <ArgType, string>(ArgType.Arg_on, on))); base.Init(hal, ActionPackageType.act_button); }
/// <summary> /// 显示背景 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="id">层id</param> /// <param name="filename">资源名</param> /// <param name="x">X坐标</param> /// <param name="y">Y坐标</param> /// <param name="xscale">X缩放比</param> /// <param name="yscale">Y缩放比</param> /// <param name="opacity">不透明度</param> /// <param name="ro">角度</param> public PictureCommand(int line, int indent, RunnablePackage parent, string id, string filename, string x, string y, string xscale, string yscale, string opacity, string ro) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, id))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("filename", new KeyValuePair <ArgType, string>(ArgType.Arg_filename, filename))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("x", new KeyValuePair <ArgType, string>(ArgType.Arg_x, x))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("y", new KeyValuePair <ArgType, string>(ArgType.Arg_y, y))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("xscale", new KeyValuePair <ArgType, string>(ArgType.Arg_xscale, xscale))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("yscale", new KeyValuePair <ArgType, string>(ArgType.Arg_yscale, yscale))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("opacity", new KeyValuePair <ArgType, string>(ArgType.Arg_normal, opacity))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("ro", new KeyValuePair <ArgType, string>(ArgType.Arg_over, ro))); base.Init(hal, ActionPackageType.act_picture); }
/// <summary> /// 直接描绘文本 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="items">选择项描述向量</param> public BranchCommand(int line, int indent, RunnablePackage parent, List <string> items) : base(line, indent, parent) { // 处理跳转描述列表 StringBuilder sb = new StringBuilder(); foreach (var s in items) { sb.Append(';'); sb.Append(s); } HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("link", new KeyValuePair <ArgType, string>(ArgType.Arg_link, sb.ToString().Substring(1)))); base.Init(hal, ActionPackageType.act_branch); }
/// <summary> /// 动画 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="name">目标角色的名字</param> /// <param name="id">目标立绘表情</param> /// <param name="time">目标例会位置</param> /// <param name="target">目标语音</param> /// <param name="dash">目标值</param> /// <param name="acc">加速度比</param> public MoveCommand(int line, int indent, RunnablePackage parent, string name, string id, string time, string target, string dash, string acc) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("name", new KeyValuePair <ArgType, string>(ArgType.Arg_name, name))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, id))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("time", new KeyValuePair <ArgType, string>(ArgType.Arg_time, time))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("target", new KeyValuePair <ArgType, string>(ArgType.Arg_target, target))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("dash", new KeyValuePair <ArgType, string>(ArgType.Arg_dash, dash))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("acc", new KeyValuePair <ArgType, string>(ArgType.Arg_acc, acc))); base.Init(hal, ActionPackageType.act_move); }
/// <summary> /// 显示背景 /// </summary> /// <param name="line">命令的行</param> /// <param name="indent">对齐偏移</param> /// <param name="parent">所属的可运行包装</param> /// <param name="id">背景层id</param> /// <param name="name">角色名</param> /// <param name="face">立绘表情</param> /// <param name="x">X坐标</param> /// <param name="y">Y坐标</param> /// <param name="loc">相对位置</param> public CstandCommand(int line, int indent, RunnablePackage parent, string id, string name, string face, string x, string y, string loc) : base(line, indent, parent) { HalaAttrList hal = new HalaAttrList(); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("id", new KeyValuePair <ArgType, string>(ArgType.Arg_id, id))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("name", new KeyValuePair <ArgType, string>(ArgType.Arg_name, name))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("face", new KeyValuePair <ArgType, string>(ArgType.Arg_face, face))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("x", new KeyValuePair <ArgType, string>(ArgType.Arg_x, x))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("y", new KeyValuePair <ArgType, string>(ArgType.Arg_x, y))); hal.Add(new KeyValuePair <string, KeyValuePair <ArgType, string> >("loc", new KeyValuePair <ArgType, string>(ArgType.Arg_loc, loc))); base.Init(hal, ActionPackageType.act_cstand); }