// Edit this function when creating new nodes public static ZNode CreateNode(NODE_TYPE actionNodeType, ZNodeTree nodeTree, Rect nodeRect, JSON js) { ZNode node = null; if (actionNodeType == NODE_TYPE.SCALE) { node = new ZBTActionScale(nodeTree, nodeRect, js); } return(node); }
public ZBTActionScale(ZNodeTree nodeTree, Rect wr, JSON js) : base(nodeTree, wr, ZBTActionManager.NODE_TYPE.SCALE) { scaleSpeed = "1"; scaleAmountX = "0"; scaleAmountY = "0"; scaleAmountZ = "0"; if (js != null && js.Contains("nodeParams")) { JSON paramsJS = js.ToJSON("nodeParams"); float[] scaleValues = paramsJS.ToArray <float>("scaleAmount"); Vector3 scaleAmount = new Vector3(scaleValues[0], scaleValues[1], scaleValues[2]); scaleAmountX = scaleAmount.x.ToString(); scaleAmountY = scaleAmount.y.ToString(); scaleAmountZ = scaleAmount.z.ToString(); scaleSpeed = paramsJS.ToFloat("scaleSpeed").ToString(); } }
public ZBTParallel(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.PARALLEL) { }
public ZBTSequencer(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.SEQUENCER) { }
public ZBTSelector(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.SELECTOR) { }
public ZBTDynamicSelector(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.DYNAMIC_SELECTOR) { }
public ZBTNegator(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.NEGATOR) { }
public ZBTRepeater(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.REPEATER) { }