예제 #1
0
    // 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);
    }
예제 #2
0
    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();
        }
    }
예제 #3
0
 public ZBTParallel(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.PARALLEL)
 {
 }
예제 #4
0
 public ZBTSequencer(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.SEQUENCER)
 {
 }
예제 #5
0
 public ZBTSelector(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.SELECTOR)
 {
 }
예제 #6
0
 public ZBTDynamicSelector(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.DYNAMIC_SELECTOR)
 {
 }
예제 #7
0
 public ZBTNegator(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.NEGATOR)
 {
 }
예제 #8
0
 public ZBTRepeater(ZNodeTree nodeTree, Rect wr) : base(nodeTree, wr, NODE_TYPE.REPEATER)
 {
 }