18 lines
8.0 KiB
HTML
18 lines
8.0 KiB
HTML
<html><head><meta http-equiv="X-UA-Compatible" content="IE=edge" /><link rel="shortcut icon" href="../icons/favicon.ico" /><link rel="stylesheet" type="text/css" href="../styles/branding.css" /><link rel="stylesheet" type="text/css" href="../styles/branding-en-US.css" /><script type="text/javascript" src="../scripts/branding.js"> </script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Sprite.MoveTo Method </title><meta name="Language" content="en-us" /><meta name="System.Keywords" content="MoveTo method" /><meta name="System.Keywords" content="Sprite.MoveTo method" /><meta name="Microsoft.Help.F1" content="SpriteLibrary.Sprite.MoveTo" /><meta name="Microsoft.Help.Id" content="Overload:SpriteLibrary.Sprite.MoveTo" /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="BrandingAware" content="true" /><meta name="container" content="SpriteLibrary" /><meta name="file" content="1f2c365c-e65b-3894-2e47-41f07250bbc0" /><meta name="guid" content="1f2c365c-e65b-3894-2e47-41f07250bbc0" /><link rel="stylesheet" type="text/css" href="../styles/branding-Website.css" /><script type="text/javascript" src="../scripts/jquery-1.11.0.min.js"></script><script type="text/javascript" src="../scripts/branding-Website.js"></script><script type="text/javascript" src="../scripts/clipboard.min.js"></script></head><body onload="OnLoad('cs')"><input type="hidden" id="userDataCache" class="userDataStyle" /><div class="pageHeader" id="PageHeader">SpriteLibrary<form id="SearchForm" method="get" action="#" onsubmit="javascript:TransferToSearchPage(); return false;"><input id="SearchTextBox" type="text" maxlength="200" /><button id="SearchButton" type="submit"></button></form></div><div class="pageBody"><div class="leftNav" id="leftNav"><div id="tocNav"><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="6b7227c0-7a6a-6342-3b08-917c7de429cc.htm" title="SpriteLibrary" tocid="roottoc">SpriteLibrary</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="6b7227c0-7a6a-6342-3b08-917c7de429cc.htm" title="SpriteLibrary" tocid="6b7227c0-7a6a-6342-3b08-917c7de429cc">SpriteLibrary</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="66013d9b-4126-7d65-05bb-94eb9d134be6.htm" title="Sprite Class" tocid="66013d9b-4126-7d65-05bb-94eb9d134be6">Sprite Class</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="abfab841-a96c-b22d-7cd8-fec3aba92510.htm" title="Sprite Methods" tocid="abfab841-a96c-b22d-7cd8-fec3aba92510">Sprite Methods</a></div><div class="toclevel1 current" data-toclevel="1" data-childrenloaded="true"><a class="tocExpanded" onclick="javascript: Toggle(this);" href="#!" /><a data-tochassubtree="true" href="1f2c365c-e65b-3894-2e47-41f07250bbc0.htm" title="MoveTo Method " tocid="1f2c365c-e65b-3894-2e47-41f07250bbc0">MoveTo Method </a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="16df05cc-8770-7cbe-f754-ba9e386674ad.htm" title="MoveTo Method (List(Point))" tocid="16df05cc-8770-7cbe-f754-ba9e386674ad">MoveTo Method (List(Point))</a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="eefee0d8-fb59-4546-386a-53f40c545c43.htm" title="MoveTo Method (Point)" tocid="eefee0d8-fb59-4546-386a-53f40c545c43">MoveTo Method (Point)</a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="27051af5-8ad4-0b54-231d-456499ae5b51.htm" title="MoveTo Method (Sprite)" tocid="27051af5-8ad4-0b54-231d-456499ae5b51">MoveTo Method (Sprite)</a></div></div><div id="tocResizableEW" onmousedown="OnMouseDown(event);"></div><div id="TocResize" class="tocResize"><img id="ResizeImageIncrease" src="../icons/TocOpen.gif" onclick="OnIncreaseToc()" alt="Click or drag to resize" title="Click or drag to resize" /><img id="ResizeImageReset" src="../icons/TocClose.gif" style="display:none" onclick="OnResetToc()" alt="Click or drag to resize" title="Click or drag to resize" /></div></div><div class="topicContent" id="TopicContent"><table class="titleTable"><tr><td class="titleColumn">Sprite<span id="LST123BFDA3_0"></span><script type="text/javascript">AddLanguageSpecificTextSet("LST123BFDA3_0?cpp=::|nu=.");</script>MoveTo Method </td></tr></table><span class="introStyle"></span> <div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('ID0RB')" onkeypress="SectionExpandCollapse_CheckKey('ID0RB', event)" tabindex="0"><img id="ID0RBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />Overload List</span></div><div id="ID0RBSection" class="collapsibleSection"><table class="members" id="overloadMembersList"><tr><th class="iconColumn">
|
||
|
||
</th><th>Name</th><th>Description</th></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="16df05cc-8770-7cbe-f754-ba9e386674ad.htm">MoveTo(List<span id="LST123BFDA3_1"></span><script type="text/javascript">AddLanguageSpecificTextSet("LST123BFDA3_1?cs=<|vb=(Of |cpp=<|fs=<'|nu=(");</script>Point<span id="LST123BFDA3_2"></span><script type="text/javascript">AddLanguageSpecificTextSet("LST123BFDA3_2?cs=>|vb=)|cpp=>|fs=>|nu=)");</script>)</a></td><td><div class="summary">
|
||
Tell the sprite to move towards each point in turn. The sprite will move in a straight line until the first point.
|
||
From there it moves to the next point, until it has reached the last point. Every time it reaches a point, the
|
||
SpriteArrivedAtWaypoint event is triggered. When it reaches the final point in the list, the SpriteArrivedAtEndPoint
|
||
event is triggered. While the sprite is moving, the SpriteReachedEndPoint attribute is set to false. When it has
|
||
arrived, it is set to true.
|
||
</div></td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="eefee0d8-fb59-4546-386a-53f40c545c43.htm">MoveTo(Point)</a></td><td><div class="summary">
|
||
Tell the Sprite to move towards a destination. You need to give the sprite a MovementSpeed
|
||
and tell the sprite that it can automatically move. But the sprite will begin a journey towards
|
||
that point at the MovementSpeed you have set. When it gets to the point, the SpriteArrivedAtEndPoint event
|
||
will fire off. Also, the SpriteReachedEnd bool will be true.
|
||
</div></td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="27051af5-8ad4-0b54-231d-456499ae5b51.htm">MoveTo(Sprite)</a></td><td><div class="summary">
|
||
Move to where the destination sprite currently is at. This is a dumb move. It does not take into
|
||
consideration the movement direction of the destination sprite. So the moving sprite does need to be
|
||
moving a bit faster than the sprite you are trying to hit for it to do so.
|
||
</div></td></tr></table><a href="#PageHeader">Top</a></div><div class="collapsibleAreaRegion" id="seeAlsoSection"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('ID1RB')" onkeypress="SectionExpandCollapse_CheckKey('ID1RB', event)" tabindex="0"><img id="ID1RBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />See Also</span></div><div id="ID1RBSection" class="collapsibleSection"><h4 class="subHeading">Reference</h4><div class="seeAlsoStyle"><a href="66013d9b-4126-7d65-05bb-94eb9d134be6.htm">Sprite Class</a></div><div class="seeAlsoStyle"><a href="6b7227c0-7a6a-6342-3b08-917c7de429cc.htm">SpriteLibrary Namespace</a></div></div></div></div><div id="pageFooter" class="pageFooter"> </div></body></html> |