ToDraw

From SRASWiki

Jump to: navigation, search

This class contains the methods to write the toDraw XML file for inputting into the UI.

It has the following methods:

Contents

prepareNpcs($xmlDoc,$rootnode,$npcArray)

This method writes the XML for all of the npc's in NpcArray and their current statuses. Three parameters are required:

  1. xmlDoc - This is the DOMDocument
  2. rootnode - This is the rootnode to which the npcs will be added
  3. npcArray = This is the array of npcs to add to the xml
preparePcs($xmlDoc,$rootnode,$npcArray)

The same as above but for Pcs.

prepareEvents($xmlDoc,$rootnode,$npcArray)

The same as above but for events.

saveXml($xmlDoc)

Saves the xml to a specified file location

writeXml($npcs,$pcs,$events)

calls all of the above methods and writes the xml

Personal tools