⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 board.html

📁 J2ME斜45度游戏引擎
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<PRE>public isoj2me.Map <B>map</B></PRE><DL><DL></DL></DL><HR><A NAME="tiles"><!-- --></A><H3>tiles</H3><PRE>public static java.util.Hashtable <B>tiles</B></PRE><DL><DL></DL></DL><HR><A NAME="characters"><!-- --></A><H3>characters</H3><PRE>public java.util.Hashtable <B>characters</B></PRE><DL><DL></DL></DL><HR><A NAME="items"><!-- --></A><H3>items</H3><PRE>public java.util.Hashtable <B>items</B></PRE><DL><DL></DL></DL><HR><A NAME="tileSet"><!-- --></A><H3>tileSet</H3><PRE>public java.lang.String <B>tileSet</B></PRE><DL><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Board()"><!-- --></A><H3>Board</H3><PRE>public <B>Board</B>()</PRE><DL><DD>Constructor. The tileset basic name will be an empty string.<P></DL><HR><A NAME="Board(java.lang.String)"><!-- --></A><H3>Board</H3><PRE>public <B>Board</B>(java.lang.String&nbsp;tileSet)</PRE><DL><DD>Constructor. The tileset basic name will be tileSet and it will be used when loading tiles image files.<P><DT><B>Parameters:</B><DD><CODE>tileSet</CODE> - basic name for tile files</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="putCharacter(isoj2me.Character)"><!-- --></A><H3>putCharacter</H3><PRE>public void <B>putCharacter</B>(isoj2me.Character&nbsp;c)</PRE><DL><DD>Add a Character to the Board.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - Character object to add</DL></DD></DL><HR><A NAME="putCharacter(java.lang.String, int, int, int)"><!-- --></A><H3>putCharacter</H3><PRE>public void <B>putCharacter</B>(java.lang.String&nbsp;name,                         int&nbsp;x,                         int&nbsp;y,                         int&nbsp;z)</PRE><DL><DD>Create and then add a Character to the Board.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the Character<DD><CODE>x</CODE> - x<DD><CODE>y</CODE> - y<DD><CODE>z</CODE> - z</DL></DD></DL><HR><A NAME="putItem(isoj2me.Item)"><!-- --></A><H3>putItem</H3><PRE>public void <B>putItem</B>(isoj2me.Item&nbsp;i)</PRE><DL><DD>Add an Item to the Board<P><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - Item object to add</DL></DD></DL><HR><A NAME="putItem(java.lang.String, int, int, int)"><!-- --></A><H3>putItem</H3><PRE>public void <B>putItem</B>(java.lang.String&nbsp;name,                    int&nbsp;x,                    int&nbsp;y,                    int&nbsp;z)</PRE><DL><DD>Create and then add an Item to the Board.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - name of the Item<DD><CODE>x</CODE> - x<DD><CODE>y</CODE> - y<DD><CODE>z</CODE> - z</DL></DD></DL><HR><A NAME="removeCharacter(isoj2me.Character)"><!-- --></A><H3>removeCharacter</H3><PRE>public void <B>removeCharacter</B>(isoj2me.Character&nbsp;c)</PRE><DL><DD>Remove a Character from the Board<P><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - Character object to remove</DL></DD></DL><HR><A NAME="removeItem(isoj2me.Item)"><!-- --></A><H3>removeItem</H3><PRE>public void <B>removeItem</B>(isoj2me.Item&nbsp;i)</PRE><DL><DD>Remove an Item from the Board<P><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - Item object to remove</DL></DD></DL><HR><A NAME="isCharacter(int, int, int)"><!-- --></A><H3>isCharacter</H3><PRE>public java.lang.String <B>isCharacter</B>(int&nbsp;x,                                    int&nbsp;y,                                    int&nbsp;z)</PRE><DL><DD>If there is a Character in the x, y, z position of the Board it returns its name. Return null if there is no character.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - x<DD><CODE>y</CODE> - y<DD><CODE>z</CODE> - z<DT><B>Returns:</B><DD>Character name</DL></DD></DL><HR><A NAME="isItem(int, int, int)"><!-- --></A><H3>isItem</H3><PRE>public java.lang.String <B>isItem</B>(int&nbsp;x,                               int&nbsp;y,                               int&nbsp;z)</PRE><DL><DD>If there is a Item in the x, y, z position of the Board it returns its name. Return null if there is no item.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - x<DD><CODE>y</CODE> - y<DD><CODE>z</CODE> - z<DT><B>Returns:</B><DD>Item name</DL></DD></DL><HR><A NAME="moveCharacter(isoj2me.Character, int, int, int, int, int, int, boolean)"><!-- --></A><H3>moveCharacter</H3><PRE>public boolean <B>moveCharacter</B>(isoj2me.Character&nbsp;c,                             int&nbsp;oldX,                             int&nbsp;oldY,                             int&nbsp;oldZ,                             int&nbsp;newX,                             int&nbsp;newY,                             int&nbsp;newZ,                             boolean&nbsp;overwrite)</PRE><DL><DD>Move a Character on the Board<P><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - Character to move<DD><CODE>oldX</CODE> - old x<DD><CODE>oldY</CODE> - old y<DD><CODE>oldZ</CODE> - old z<DD><CODE>newX</CODE> - new x<DD><CODE>newY</CODE> - new y<DD><CODE>newZ</CODE> - new z<DD><CODE>overwrite</CODE> - true if you want to overwrite an existing Character that stays in the new position<DT><B>Returns:</B><DD>true if the movement was done</DL></DD></DL><HR><A NAME="moveItem(isoj2me.Item, int, int, int, int, int, int, boolean)"><!-- --></A><H3>moveItem</H3><PRE>public boolean <B>moveItem</B>(isoj2me.Item&nbsp;i,                        int&nbsp;oldX,                        int&nbsp;oldY,                        int&nbsp;oldZ,                        int&nbsp;newX,                        int&nbsp;newY,                        int&nbsp;newZ,                        boolean&nbsp;overwrite)</PRE><DL><DD>Move an Item on the Board<P><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - Item to move<DD><CODE>oldX</CODE> - old x<DD><CODE>oldY</CODE> - old y<DD><CODE>oldZ</CODE> - old z<DD><CODE>newX</CODE> - new x<DD><CODE>newY</CODE> - new y<DD><CODE>newZ</CODE> - new z<DD><CODE>overwrite</CODE> - true if you want to overwrite an existing Item that stays in the new position<DT><B>Returns:</B><DD>true if the movement was done</DL></DD></DL><HR><A NAME="setTileSize(int, int)"><!-- --></A><H3>setTileSize</H3><PRE>public void <B>setTileSize</B>(int&nbsp;width,                        int&nbsp;height)</PRE><DL><DD>This method change the shape of the basic tile. This affect the coordinates of the tiles painted by the <b>draw()</b> method<P><DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of the tile<DD><CODE>height</CODE> - the distance between the base of the tile file and the "floor" of the basic tile</DL></DD></DL><HR><A NAME="createMap(java.lang.String, int)"><!-- --></A><H3>createMap</H3><PRE>public void <B>createMap</B>(java.lang.String&nbsp;baseFilename,                      int&nbsp;numberOfLayers)</PRE><DL><DD>This method call the Map() constructor passing the base name for the map files and the number of layers<P><DD><DL><DT><B>Parameters:</B><DD><CODE>baseFilename</CODE> - base name for the map files<DD><CODE>numberOfLayers</CODE> - number of layers to load</DL></DD></DL><HR><A NAME="draw(int, int, int, int, int, int, javax.microedition.lcdui.Graphics)"><!-- --></A><H3>draw</H3><PRE>public void <B>draw</B>(int&nbsp;x,                 int&nbsp;y,                 int&nbsp;cellX,                 int&nbsp;cellY,                 int&nbsp;width,                 int&nbsp;height,                 javax.microedition.lcdui.Graphics&nbsp;g)</PRE><DL><DD>This one of the main method of this class. It paint on the given Graphics the board with its tiles and characters.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - where to paint on the Graphics (x)<DD><CODE>y</CODE> - where to paint on the Graphics (y)<DD><CODE>cellX</CODE> - starting cell on the map (x)<DD><CODE>cellY</CODE> - starting cell on the mpa (y)<DD><CODE>width</CODE> - width of the map area to be painted (starting from cellX)<DD><CODE>height</CODE> - height of the map area to be painted (starting from cellY)<DD><CODE>g</CODE> - Graphics object where to paint</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><div class=mondonerd><a class=mondonerdlink href=http://mondonerd.com>MONDONERD.COM</a></div></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../isoj2me/Character.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Board.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT>  <!--  if(window==top) {    document.writeln('<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT><A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -