{"id":746,"date":"2013-12-03T19:38:23","date_gmt":"2013-12-03T18:38:23","guid":{"rendered":"http:\/\/labalec.fr\/erwan\/?p=746"},"modified":"2013-12-03T20:11:44","modified_gmt":"2013-12-03T19:11:44","slug":"vb-net-and-article-22-2-classes-to-handle-character-move","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=746","title":{"rendered":"VB.Net and Article 22 : 2 classes to handle character move"},"content":{"rendered":"<p>In previous article, I have regularly used either a rotating sprite (a car, a rocket, a tank, etc) OR an animated sprite (a walking character).<\/p>\n<p>Here below these 2 classes.<br \/>\nYou can use them in as a quick start for a game so that you dont have to bother with this part.<\/p>\n<p>To use it the animated class :<br \/>\n&#8211;<strong>declare <\/strong>it <code>Dim animated As Animated<\/code><br \/>\n&#8211;<strong>load<\/strong> it <code>animated = New Animated(mTexture, 1, position, 0, 28, 32)<\/code><br \/>\n&#8211;<strong>update<\/strong> it <code>animated.Update(position, direction_)<\/code><br \/>\n&#8211;<strong>draw<\/strong> it <code>animated.Draw(spriteBatch)<\/code><\/p>\n<p>Same goes with the rotating class :<br \/>\n&#8211;<strong>declare <\/strong>it <code>Dim rotated As rotated<\/code><br \/>\n&#8211;<strong>load <\/strong>it <code>rotated = New rotated(texture, _scale, New Vector2(50, 50), New Vector2(0, 0), _rotation, _speed)<\/code><br \/>\n&#8211;<strong>update<\/strong> it <code>rotated.Update(_rotation, _speed)<\/code><br \/>\n&#8211;<strong>draw<\/strong> it <code>rotated.Draw(SpriteBatch)<\/code><\/p>\n<p>The animated class here : <a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/12\/clsrotated.zip\">clsRotated<\/a> .<br \/>\nThe rotating class here : <a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/12\/clsAnimated.zip\">clsAnimated<\/a> .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In previous article, I have regularly used either a rotating sprite (a car, a rocket, a tank, etc) OR an animated sprite (a walking character). Here below these 2 classes. You can use them in as a quick start for a game so that you dont have to bother with this part. To use it <a href='https:\/\/labalec.fr\/erwan\/?p=746' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,35],"tags":[],"class_list":["post-746","post","type-post","status-publish","format-standard","hentry","category-dotnet","category-xna","category-34-id","category-35-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/746","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=746"}],"version-history":[{"count":3,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/746\/revisions"}],"predecessor-version":[{"id":753,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/746\/revisions\/753"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}