<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: Character</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Character</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/lib/core/character_rb.html">
lib/core/character.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
<a href="GameObject.html">
GameObject
</a>
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="diagram">
<map id="map" name="map">
<area shape="RECT" coords="26,113,104,161" href="Character.html" alt="Character
">
<area shape="RECT" coords="21,17,109,65" href="GameObject.html" alt="GameObject
">
</map>
<img src="../dot/f_10.png" usemap="#map" border=0 alt="TopLevel">
</div>
<div id="description">
<p>
The <a href="Character.html">Character</a> class is the mother of all
characters. Who’s their daddy?
</p>
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000302">describe</a>
<a href="#M000299">new</a>
<a href="#M000301">parse</a>
<a href="#M000300">sendto</a>
<a href="#M000303">show</a>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<div id="attribute-list">
<h3 class="section-bar">Attributes</h3>
<div class="name-list">
<table>
<tr class="top-aligned-row context-row">
<td class="context-item-name">account</td>
<td class="context-item-value"> [RW] </td>
<td class="context-item-desc"></td>
</tr>
</table>
</div>
</div>
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000299" class="method-detail">
<a name="M000299"></a>
<div class="method-heading">
<a href="Character.src/M000299.html" target="Code" class="method-signature"
onclick="popupCode('Character.src/M000299.html');return false;">
<span class="method-name">new</span><span class="method-args">(name,acctid)</span>
</a>
</div>
<div class="method-description">
<p>
Create a new <a href="Character.html">Character</a> object IMPORTANT :<a
href="Character.html">Character</a> objects must be marked nonswappable
while connected!!!
</p>
<pre>
Otherwise we risk losing the contants of @account
</pre>
<dl>
<dt><tt>name</tt></dt><dd>The displayed name of the character.
</dd>
<dt><tt>acctid</tt></dt><dd>The account id this character belongs to.
</dd>
<dt><tt>return</tt></dt><dd>A handle to the new <a href="Character.html">Character</a>.
</dd>
</dl>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000302" class="method-detail">
<a name="M000302"></a>
<div class="method-heading">
<a href="Character.src/M000302.html" target="Code" class="method-signature"
onclick="popupCode('Character.src/M000302.html');return false;">
<span class="method-name">describe</span><span class="method-args">(e)</span>
</a>
</div>
<div class="method-description">
<p>
<a href="Event.html">Event</a> :describe
</p>
<dl>
<dt><tt>e</tt></dt><dd>The event
</dd>
<dt><tt>return</tt></dt><dd>Undefined
</dd>
</dl>
</div>
</div>
<div id="method-M000301" class="method-detail">
<a name="M000301"></a>
<div class="method-heading">
<a href="Character.src/M000301.html" target="Code" class="method-signature"
onclick="popupCode('Character.src/M000301.html');return false;">
<span class="method-name">parse</span><span class="method-args">(m)</span>
</a>
</div>
<div class="method-description">
<p>
All command input routed through here and parsed.
</p>
<dl>
<dt><tt>m</tt></dt><dd>The input message to be parsed
</dd>
<dt><tt>return</tt></dt><dd>Undefined.
</dd>
</dl>
</div>
</div>
<div id="method-M000300" class="method-detail">
<a name="M000300"></a>
<div class="method-heading">
<a href="Character.src/M000300.html" target="Code" class="method-signature"
onclick="popupCode('Character.src/M000300.html');return false;">
<span class="method-name">sendto</span><span class="method-args">(s)</span>
</a>
</div>
<div class="method-description">
<p>
Sends a message to the character if they are connected.
</p>
<dl>
<dt><tt>s</tt></dt><dd>The message string
</dd>
<dt><tt>return</tt></dt><dd>Undefined.
</dd>
</dl>
</div>
</div>
<div id="method-M000303" class="method-detail">
<a name="M000303"></a>
<div class="method-heading">
<a href="Character.src/M000303.html" target="Code" class="method-signature"
onclick="popupCode('Character.src/M000303.html');return false;">
<span class="method-name">show</span><span class="method-args">(e)</span>
</a>
</div>
<div class="method-description">
<p>
<a href="Event.html">Event</a> :show
</p>
<dl>
<dt><tt>e</tt></dt><dd>The event
</dd>
<dt><tt>return</tt></dt><dd>Undefined
</dd>
</dl>
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>