示例#1
0
 /// <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);
 }
示例#2
0
 /// <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);
 }
示例#3
0
 /// <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);
 }
示例#4
0
 /// <summary>
 /// 添加标签
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 /// <param name="label">标签名</param>
 public LabelCommand(int line, int indent, RunnablePackage parent, string label)
     : base(line, indent, parent)
 {
     HalaAttrList hal = new HalaAttrList();
     hal.Add(new KeyValuePair<string, KeyValuePair<ArgType, string>>("name", new KeyValuePair<ArgType, string>(ArgType.Arg_name, label)));
     base.Init(hal, ActionPackageType.act_label);
 }
示例#5
0
 /// <summary>
 /// 代码片段
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 /// <param name="code">代码片段</param>
 public ScriptCommand(int line, int indent, RunnablePackage parent, string code)
     : base(line, indent, parent)
 {
     HalaAttrList hal = new HalaAttrList();
     hal.Add(new KeyValuePair<string, KeyValuePair<ArgType, string>>("context", new KeyValuePair<ArgType, string>(ArgType.unknown, code)));
     base.Init(hal, ActionPackageType.script);
 }
示例#6
0
 /// <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);
 }
示例#7
0
 /// <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);
 }
示例#8
0
 /// <summary>
 /// 显示背景
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 /// <param name="id">背景层id</param>
 /// <param name="filename">资源文件名</param>
 public BgCommand(int line, int indent, RunnablePackage parent, string id, string filename)
     : 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)));
     base.Init(hal, ActionPackageType.act_bg);
 }
示例#9
0
 /// <summary>
 /// 开关操作
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 /// <param name="id">要操作的开关id</param>
 /// <param name="state">目标状态</param>
 public SwitchCommand(int line, int indent, RunnablePackage parent, string id, string state)
     : 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, state)));
     base.Init(hal, ActionPackageType.act_switch);
 }
示例#10
0
 /// <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);
 }
示例#11
0
 /// <summary>
 /// 函数调用
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 /// <param name="funCallName">函数名</param>
 /// <param name="args">实参列表</param>
 public FuncallCommand(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);
 }
示例#12
0
 /// <summary>
 /// 播放BGM
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 /// <param name="seName">SE资源名</param>
 /// <param name="vol">音量</param>
 public SECommand(int line, int indent, RunnablePackage parent, string seName, 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, seName)));
     hal.Add(new KeyValuePair<string, KeyValuePair<ArgType, string>>("vol", new KeyValuePair<ArgType, string>(ArgType.Arg_vol, vol)));
     base.Init(hal, ActionPackageType.act_se);
 }
示例#13
0
 /// <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);
 }
示例#14
0
 /// <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);
 }
示例#15
0
 /// <summary>
 /// 循环
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 /// <param name="containElse">是否包含else子句</param>
 /// <param name="expr">表达式</param>
 /// <param name="op1">操作数1</param>
 /// <param name="opr">操作符</param>
 /// <param name="op2">操作数2</param>
 public IfCommand(int line, int indent, RunnablePackage parent, bool containElse, string expr, string op1, string opr, string op2)
 {
     this.parent = parent;
     this.indent = indent;
     this.commandLine = line;
     this.isContainElse = containElse;
     this.operand1 = op1;
     this.operand2 = op2;
     this.operateMode = opr;
     this.condExpr = expr;
 }
示例#16
0
 /// <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);
 }
示例#17
0
 /// <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 ButtonCommand(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);
 }
示例#18
0
 /// <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);
 }
示例#19
0
 /// <summary>
 /// 粘贴代码向量里的代码
 /// </summary>
 /// <param name="parent">所属包装</param>
 /// <param name="begin">插入行</param>
 /// <param name="copys">待复制项目</param>
 public MenuPasteCommand(RunnablePackage parent, int begin, List<ActionPackage> copys)
 {
     this.parent = parent;
     this.begin = begin;
     this.copyAPRef = new List<ActionPackage>();
     // 深拷贝
     foreach (var ap in copys)
     {
         this.copyAPRef.Add(ap.Clone());
     }
     // 处理缩进
     this.baseIndentOld = this.copyAPRef[0].indent;
     this.baseIndentNew = this.parent.GetAction(this.begin).indent;
     foreach (var ap in this.copyAPRef)
     {
         ap.indent -= this.baseIndentOld;
     }
 }
示例#20
0
 /// <summary>
 /// 删除代码向量里的代码
 /// </summary>
 /// <param name="parent">所属包装</param>
 /// <param name="begin">开始删除的行</param>
 /// <param name="count">受影响的行数</param>
 public MenuDeleteCommand(RunnablePackage parent, int begin, int count)
 {
     this.parent = parent;
     this.begin = begin;
     this.count = count;
 }
示例#21
0
 /// <summary>
 /// 循环
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 public ForCommand(int line, int indent, RunnablePackage parent)
 {
     this.parent = parent;
     this.indent = indent;
     this.commandLine = line;
 }
示例#22
0
 /// <summary>
 /// 结束当前场景
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 public ReturnCommand(int line, int indent, RunnablePackage parent)
     : base(line, indent, parent)
 {
     base.Init(new HalaAttrList(), ActionPackageType.act_return);
 }
示例#23
0
 /// <summary>
 /// 停止背景音乐
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 public StopBGMCommand(int line, int indent, RunnablePackage parent)
     : base(line, indent, parent)
 {
     base.Init(new HalaAttrList(), ActionPackageType.act_stopbgm);
 }
示例#24
0
 /// <summary>
 /// 等待动画结束
 /// </summary>
 /// <param name="line">命令的行</param>
 /// <param name="indent">对齐偏移</param>
 /// <param name="parent">所属的可运行包装</param>
 public WaitaniCommand(int line, int indent, RunnablePackage parent)
     : base(line, indent, parent)
 {
     base.Init(new HalaAttrList(), ActionPackageType.act_waitani);
 }
 /// <summary>
 /// 构造一个待执行的单条语句
 /// </summary>
 /// <param name="line">所在的行</param>
 /// <param name="indent">列偏移</param>
 /// <param name="parent">所述包装</param>
 public IHalationSingleCommand(int line, int indent, RunnablePackage parent)
 {
     this.parent = parent;
     this.indent = indent;
     this.commandLine = line;
 }
示例#26
-1
 /// <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);
 }