浏览代码

Serialized triggers of actions

moreau-mathis 9 年之前
父节点
当前提交
fa8c06b8b8
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/Actions/babylon.actionManager.ts

+ 10 - 0
src/Actions/babylon.actionManager.ts

@@ -308,6 +308,16 @@
                     properties: []
                 };
                 
+                var triggerOptions = this.actions[i].triggerOptions;
+                if (triggerOptions) {
+                    if (triggerOptions instanceof Node) {
+                        triggerObject.properties.push(Action._GetTargetProperty(triggerOptions.trigger));
+                    }
+                    else {
+                        triggerObject.properties.push({ name: "parameter", value: triggerOptions.parameter });
+                    }
+                }
+                
                 // Serialize child action, recursively
                 this.actions[i].serialize(triggerObject);