Advertisement
ticktockgames

EpokDirectorNodeLibrary.xml Sample

Jun 18th, 2013
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 12.14 KB | None | 0 0
  1. <!-- CGFNodeLibrary.as -->
  2. <root>
  3.     <formats>
  4.         <format id="library">
  5.             <!-- Win -->
  6.             <classFilePath>..\src\com\blogger\ticktockgames\cgf\data\CGFDirectorNodeLibrary.as</classFilePath>
  7.             <!-- Mac -->
  8.             <classFilePathMac>../src/com/blogger/ticktockgames/cgf/data/CGFDirectorNodeLibrary.as</classFilePathMac>
  9.             <header>package com.blogger.ticktockgames.cgf.data
  10. {
  11.     import com.blogger.ticktockgames.cgf.CGFGameModelInterface;
  12.     import com.blogger.ticktockgames.epok.data.DirectorNodeLibrary;
  13.     import com.blogger.ticktockgames.epok.data.DialogChoice;
  14.     import com.blogger.ticktockgames.epok.data.DialogContent;
  15.     import com.blogger.ticktockgames.epok.data.DirectorNode;
  16.     import com.blogger.ticktockgames.epok.utils.DLog;
  17.    
  18.     import flash.utils.getDefinitionByName;
  19.     import flash.utils.getQualifiedClassName;
  20.    
  21.     import flash.utils.getDefinitionByName;
  22.     import flash.utils.getQualifiedClassName;
  23.  
  24.     /*
  25.     *   This is an autogenerated class.
  26.     *   Do not edit this file directly.
  27.     *   Change the corresponding XML file labeled CGFDirectorNodeLibrary.xml
  28.     */
  29.  
  30.     public class CGFDirectorNodeLibrary extends DirectorNodeLibrary
  31.     {
  32.         public function CGFDirectorNodeLibrary():void
  33.         {
  34.             // Do nothing
  35.         }
  36.         /*
  37.         public static function getNodeById( idStr:String ):DirectorNode
  38.         {
  39.             //var className:Class = getLibraryClass();
  40.             //var targetFunction:Function = className[idStr]
  41.             //var targetFunction:Function = className[idStr] as Function;
  42.            
  43.             var resultNode:DirectorNode = CGFDirectorNodeLibrary[idStr]();
  44.  
  45.             // Check if function is valid
  46.             if( resultNode === null)
  47.             {
  48.                 DLog.e( "DirectorNodeLibrary.getNodeById(" + idStr.toString() + ")", "Function returned invalid.");
  49.                 return null;   
  50.             }
  51.            
  52.             return resultNode = CGFDirectorNodeLibrary[idStr]();
  53.             //return resultNode = className.targetFunction() as DirectorNode;
  54.         }
  55.         */
  56.         protected override function getLibraryClass():Class
  57.         {
  58.             return CGFDirectorNodeLibrary;
  59.         }
  60.             </header>
  61.             <footer>
  62.     } // class
  63. } // package
  64.             </footer>
  65.             <nodeHeader>
  66.         public static function {}():DirectorNode
  67.         {}
  68.             </nodeHeader>
  69.             <nodeFooter>
  70.         {} // function {}
  71.             </nodeFooter>
  72.         </format>
  73.         <format id="flags">
  74.             <!-- Win -->
  75.             <classFilePath>..\src\com\blogger\ticktockgames\cgf\data\CGFDirectorFlagModel.as</classFilePath>
  76.             <!-- Mac -->
  77.             <classFilePathMac>../src/com/blogger/ticktockgames/cgf/data/CGFDirectorFlagModel.as</classFilePathMac>
  78.             <header>package com.blogger.ticktockgames.cgf.data
  79. {
  80.     import com.blogger.ticktockgames.epok.utils.DLog;
  81.     import com.blogger.ticktockgames.epok.data.DirectorFlagModelBase;
  82.    
  83.     /*
  84.     *   This is an autogenerated class.
  85.     *   Do not edit this file directly.
  86.     *   Change the corresponding XML file labeled CGFDirectorNodeLibrary.xml
  87.     */
  88.  
  89.     public class CGFDirectorFlagModel extends DirectorFlagModelBase
  90.     {
  91.         public function CGFDirectorFlagModel()
  92.         {
  93.             // Default Constructor
  94.             super();
  95.         }
  96.             </header>
  97.             <footer>
  98.     } // class
  99. } // package
  100.             </footer>
  101.             <propertyFormat>public var {}:int = 0;</propertyFormat>
  102.         </format>
  103.     </formats>
  104.     <nodes> <!-- All Nodes are defined here -->
  105.         <node id= "KarensHouse_1">
  106.             <meta>
  107.                 <description>No Sister</description>
  108.             </meta>
  109.             <condition>function(){
  110.                     return true;
  111.                 };
  112.             </condition>
  113.             <onEnter>function(){
  114.                     // Insert Enter code here
  115.                     return;
  116.                 };
  117.             </onEnter>
  118.             <onExit>function(){
  119.                     // Insert Exit code here
  120.                     return;
  121.                 };
  122.             </onExit>
  123.             <choices>
  124.             </choices>
  125.             <nextNodes>
  126.                 <nextNode id= "KarensHouse_2"/>
  127.             </nextNodes>
  128.             <dialog>
  129.                 <speaker>Karen</speaker>
  130.                 <body>I can't believe Katie didn't show up to my 30th. She was so excited about it. It's just not like her to flake on me.</body>
  131.             </dialog>
  132.             <flags>
  133.                 <flag id= "KarensHouse_1"/>
  134.             </flags>
  135.         </node>
  136.         <node id= "KarensHouse_2">
  137.             <meta>
  138.                 <description>Action Decision</description>
  139.             </meta>
  140.             <condition>function(){
  141.                     return true;
  142.                 };
  143.             </condition>
  144.             <onEnter>function(){
  145.                     // Insert Enter code here
  146.                     return;
  147.                 };
  148.             </onEnter>
  149.             <onExit>function(){
  150.                     // Insert Exit code here
  151.                     return;
  152.                 };
  153.             </onExit>
  154.             <choices>
  155.                 <choice targetID= "KarensHouse_3">
  156.                     <label>Check Voicemail</label>
  157.                 </choice>
  158.                 <choice targetID= "KarensHouse_4">
  159.                     <label>Call Katie</label>
  160.                 </choice>
  161.                 <choice targetID= "KarensHouse_6">
  162.                     <label>Call Police</label>
  163.                 </choice>
  164.                 <choice targetID= "KarensHouse_5">
  165.                     <label>Leave</label>
  166.                 </choice>
  167.             </choices>
  168.             <nextNodes>
  169.             </nextNodes>
  170.             <dialog>
  171.                 <speaker></speaker>
  172.                 <body></body>
  173.             </dialog>
  174.             <flags>
  175.             </flags>
  176.         </node>
  177.         <node id= "KarensHouse_3">
  178.             <meta>
  179.                 <description>I have your sister</description>
  180.             </meta>
  181.             <condition>function(){
  182.                     var flags = CGFGameModelInterface.getDirectorFlags();
  183.                     return flags.getFlagValueByName("KarensHouse_3") != 1;
  184.                 };
  185.             </condition>
  186.             <onEnter>function(){
  187.                     var flags = CGFGameModelInterface.getDirectorFlags();
  188.                     flags.setFlagByName("KarensHouse_3", 1);
  189.                     return;
  190.                 };
  191.             </onEnter>
  192.             <onExit>function(){
  193.                     // Insert Exit code here
  194.                     return;
  195.                 };
  196.             </onExit>
  197.             <choices>
  198.             </choices>
  199.             <nextNodes>
  200.                 <nextNode id= "KarensHouse_10"/>
  201.             </nextNodes>
  202.             <dialog>
  203.                 <speaker></speaker>
  204.                 <body>Karen Checks her voicemail.</body>
  205.             </dialog>
  206.             <flags>
  207.                 <flag id= "KarensHouse_3"/>
  208.             </flags>
  209.         </node>
  210.         <node id= "KarensHouse_4">
  211.             <meta>
  212.                 <description>I'm not here...</description>
  213.             </meta>
  214.             <condition>function(){
  215.                     var flags = CGFGameModelInterface.getDirectorFlags();
  216.                     return flags.getFlagValueByName("KarensHouse_4") != 1;
  217.                 };
  218.             </condition>
  219.             <onEnter>function(){
  220.                     var flags = CGFGameModelInterface.getDirectorFlags();
  221.                     flags.setFlagByName("KarensHouse_4", 1);
  222.                     return;
  223.                 };
  224.             </onEnter>
  225.             <onExit>function(){
  226.                     // Insert Exit code here
  227.                     return;
  228.                 };
  229.             </onExit>
  230.             <choices>
  231.             </choices>
  232.             <nextNodes>
  233.                 <nextNode id= "KarensHouse_11"/>
  234.             </nextNodes>
  235.             <dialog>
  236.                 <speaker></speaker>
  237.                 <body>Karen calls Katie</body>
  238.             </dialog>
  239.             <flags>
  240.                 <flag id= "KarensHouse_4"/>
  241.             </flags>           
  242.         </node>
  243.         <node id= "KarensHouse_5">
  244.             <meta>
  245.                 <description>Leave Options</description>
  246.             </meta>
  247.             <condition>function(){
  248.                     return true;
  249.                 };
  250.             </condition>
  251.             <onEnter>function(){
  252.                     // Insert Enter code here
  253.                     return;
  254.                 };
  255.             </onEnter>
  256.             <onExit>function(){
  257.                     // Insert Exit code here
  258.                     return;
  259.                 };
  260.             </onExit>
  261.             <choices>
  262.             </choices>
  263.             <nextNodes>
  264.                 <nextNode id= "KarensHouse_7"/>
  265.                 <nextNode id= "KarensHouse_8"/>
  266.             </nextNodes>
  267.             <dialog>
  268.                 <speaker></speaker>
  269.                 <body></body>
  270.             </dialog>
  271.             <flags>
  272.             </flags>           
  273.         </node>
  274.         <node id= "KarensHouse_6">
  275.             <meta>
  276.                 <description>Call Police</description>
  277.             </meta>
  278.             <condition>function(){
  279.                     var flags = CGFGameModelInterface.getDirectorFlags();
  280.                     return (flags.getFlagValueByName("KarensHouse_6") == 0 &amp;&amp; flags.getFlagValueByName("KarensHouse_9") == 1);
  281.                 };
  282.             </condition>
  283.             <onEnter>function(){
  284.                     var flags = CGFGameModelInterface.getDirectorFlags();
  285.                     flags.setFlagByName("KarensHouse_6", 1);
  286.                     return;
  287.                 };
  288.             </onEnter>
  289.             <onExit>function(){
  290.                     // Insert Exit code here
  291.                     return;
  292.                 };
  293.             </onExit>
  294.             <choices>
  295.             </choices>
  296.             <nextNodes>
  297.                 <nextNode id= "KarensHouse_2"/>
  298.             </nextNodes>
  299.             <dialog>
  300.                 <speaker>Karen</speaker>
  301.                 <body>Maybe I should just do what he says. I don't want to risk it.</body>
  302.             </dialog>
  303.             <flags>
  304.                 <flag id= "KarensHouse_6"/>
  305.             </flags>
  306.         </node>
  307.         <node id= "KarensHouse_7">
  308.             <meta>
  309.                 <description>Leave A</description>
  310.             </meta>
  311.             <condition>function(){
  312.                     var flags = CGFGameModelInterface.getDirectorFlags();
  313.                     return (flags.getFlagValueByName("KarensHouse_9") == 0);
  314.                 };
  315.             </condition>
  316.             <onEnter>function(){
  317.                     return;
  318.                 };
  319.             </onEnter>
  320.             <onExit>function(){
  321.                     // Insert Exit code here
  322.                     return;
  323.                 };
  324.             </onExit>
  325.             <choices>
  326.             </choices>
  327.             <nextNodes>
  328.                 <nextNode id= "KarensHouse_2"/>
  329.             </nextNodes>
  330.             <dialog>
  331.                 <speaker>Karen</speaker>
  332.                 <body>I don't even know where she would be.</body>
  333.             </dialog>
  334.             <flags>
  335.             </flags>
  336.         </node>
  337.         <node id= "KarensHouse_8">
  338.             <meta>
  339.                 <description>Leave B</description>
  340.             </meta>
  341.             <condition>function(){
  342.                     return true;
  343.                 };
  344.             </condition>
  345.             <onEnter>function(){
  346.                     return;
  347.                 };
  348.             </onEnter>
  349.             <onExit>function(){
  350.                     // Insert Exit code here
  351.                     return;
  352.                 };
  353.             </onExit>
  354.             <choices>
  355.             </choices>
  356.             <nextNodes>
  357.             </nextNodes>
  358.             <dialog>
  359.                 <speaker>Tommy</speaker>
  360.                 <body>Karen leaves her home.</body>
  361.             </dialog>
  362.             <flags>
  363.             </flags>
  364.         </node>
  365.         <node id= "KarensHouse_9">
  366.             <meta>
  367.                 <description>Hey Karen, it's Tommy...</description>
  368.             </meta>
  369.             <condition>function(){
  370.                 return true;
  371.                 };
  372.             </condition>
  373.             <onEnter>function(){
  374.                     var flags = CGFGameModelInterface.getDirectorFlags();
  375.                     flags.setFlagByName("KarensHouse_9", 1);
  376.                     return;
  377.                 };
  378.             </onEnter>
  379.             <onExit>function(){
  380.                     // Insert Exit code here
  381.                     return;
  382.                 };
  383.             </onExit>
  384.             <choices>
  385.             </choices>
  386.             <nextNodes>
  387.                 <nextNode id="KarensHouse_2"/>
  388.             </nextNodes>
  389.             <dialog>
  390.                 <speaker>Tommy</speaker>
  391.                 <body>Hey Karen, it's Tommy, your former brother-in-law. Katie here wishes you a happy birthday too... I'd pass the phone to her but she's a little... tied up at the moment. If you ever want to see her again you'll do exactly as I say. Meet me tonight at 888 Brannen Street. And don't try anything unless you want to become an only child. See ya soon, kiddo. *Click*</body>
  392.             </dialog>
  393.             <flags>
  394.                 <flag id="KarensHouse_9"/>
  395.             </flags>
  396.         </node>
  397.         <node id= "KarensHouse_10">
  398.             <meta>
  399.                 <description>Happy Birthday</description>
  400.             </meta>
  401.             <condition>function(){
  402.                     return true;
  403.                 };
  404.             </condition>
  405.             <onEnter>function(){
  406.                     return;
  407.                 };
  408.             </onEnter>
  409.             <onExit>function(){
  410.                     // Insert Exit code here
  411.                     return;
  412.                 };
  413.             </onExit>
  414.             <choices>
  415.             </choices>
  416.             <nextNodes>
  417.                 <nextNode id= "KarensHouse_9"/>
  418.             </nextNodes>
  419.             <dialog>
  420.                 <speaker>????</speaker>
  421.                 <body>Happy birthday to you...</body>
  422.             </dialog>
  423.             <flags>
  424.             </flags>
  425.         </node>
  426.         <node id= "KarensHouse_11">
  427.             <meta>
  428.                 <description>Hi this is Katie</description>
  429.             </meta>
  430.             <condition>function(){
  431.                     return true;
  432.                 };
  433.             </condition>
  434.             <onEnter>function(){
  435.                     return;
  436.                 };
  437.             </onEnter>
  438.             <onExit>function(){
  439.                     // Insert Exit code here
  440.                     return;
  441.                 };
  442.             </onExit>
  443.             <choices>
  444.             </choices>
  445.             <nextNodes>
  446.                 <nextNode id= "KarensHouse_2"/>
  447.             </nextNodes>
  448.             <dialog>
  449.                 <speaker>Katie</speaker>
  450.                 <body>Hi this is Katie. I'm not here right now, but if you leave you name number, and message I'll get back to you as soon as I can! *Beep*</body>
  451.             </dialog>
  452.             <flags>
  453.             </flags>
  454.         </node>
  455.         <!-- Example Nodes -->
  456.         <!-- Begin Examples
  457.         <node id= "ExampleNode">
  458.             <meta>
  459.                 <description>Debug one object</description>
  460.             </meta>
  461.             <condition>function(){
  462.                 return true;
  463.             }
  464.             </condition>
  465.             <actionable>function(){
  466.                 // Insert Actionable code here
  467.             }
  468.  
  469.             </actionable>
  470.             <choices>
  471.                 <choice id= "1" labeldialog = "Yes"/>
  472.                 <choice id= "2" labeldialog = "No"/>
  473.             </choices>
  474.             <nextNodes>
  475.                 <nextNode id= "1">
  476.             </nextNodes>
  477.             <dialog>
  478.                 <speaker>Narrator</speaker>
  479.                 <body>
  480.                     This is example dialog.
  481.                 </body>
  482.             </dialog>
  483.         </node>
  484.         <node id= "IDStr">
  485.             <meta>
  486.                 <description>Debug two object</description>
  487.             </meta>
  488.             <condition>function(){
  489.                 return true;
  490.             }
  491.             </condition>
  492.             <actionable>
  493.             </actionable>
  494.             <choices>
  495.                 <choice id= "1" labeldialog = "Yes"/>
  496.                 <choice id= "2" labeldialog = "No"/>
  497.             </choices>
  498.             <nextNodes>
  499.                 <nextNode id= "1"/>
  500.             </nextNodes>
  501.         </node>
  502.         <dialog>
  503.             <speaker>Narrator</speaker>
  504.             <body>
  505.                 This is example dialog.
  506.             </body>
  507.         </dialog>
  508.         End Examples -->
  509.     </nodes>
  510. </root>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement