{"author_name":"MrPhil","cat":"LD #23","comments":[{"author_name":"","time":"April 21, 2012 12:59 pm","epoch":1335031140,"text":"I FOUND it!!!","spam":"N"}],"epoch":1335027840,"likes":0,"metadata":{"p_key":"57622","p_author":"MrPhil","p_authorkey":"165","p_urlkey":"93371","p_title":"Lunch #1 and Serious Bug","p_cat":"LD #23","p_event":"LD23","p_time":"1335027840","p_likes":"0","p_comments":"1","p_status":"UPD5","us_key":"165","us_name":"MrPhil","us_username":"mrphil","event_start":"1334880000","event_key":"10","event_name":"LD23"},"text":"<p><strong>Lunch 1<\/strong><br \/>\n It&#8217;s almost 3 pm here in Arlington, VA and I&#8217;m having my first lunch for LD23.  Kind of late but I wait until I&#8217;m hungry.<\/p>\n <p>Chicken and Vegetable stir-fry.<br \/>\n <a href=\"http:\/\/i.imgur.com\/VlfRF.jpg\"><img alt=\"Lunch 1\" src=\"http:\/\/i.imgur.com\/VlfRF.jpg\" class=\"alignnone\" \/><\/a><\/p>\n <p><strong>Progress<\/strong><br \/>\n <a href=\"http:\/\/i.imgur.com\/Xpl9y.png\"><img alt=\"Screenshot 3\" src=\"http:\/\/i.imgur.com\/Xpl9y.png\" class=\"alignnone\" \/><\/a><br \/>\n It&#8217;s coming a long, but I&#8217;m feeling the pressure.  My task list seems too long.  Worst part is I&#8217;ve hit a bug!  Maybe you can help?  My FlashPunk Entity is not calling the Update method!  I&#8217;ve triple checked and the World Update is being called and calling the supper.Update()!<\/p>\n <blockquote><p>package SeedsOfDestruction<br \/>\n {<br \/>\n import com.greensock.easing.Cubic;<br \/>\n import com.greensock.easing.Quad;<br \/>\n import com.greensock.TweenMax;<br \/>\n import flash.display.BitmapData;<br \/>\n import net.flashpunk.Entity;<br \/>\n import net.flashpunk.FP;<br \/>\n import net.flashpunk.graphics.Image;<\/p>\n <p>\tpublic class SeedBullet extends Entity<br \/>\n {<br \/>\n [Embed(source = &#8220;\/assets\/Seed Bullet.png&#8221;)] public static const SEED_BULLET:Class;<\/p>\n <p>\t\tpublic static const SPEED:Number = 200;<\/p>\n <p>\t\tpublic var image:Image;<\/p>\n <p>\t\tpublic function SeedBullet(player:Player)<br \/>\n {<br \/>\n \/\/ Make the Pink transparent<br \/>\n var bitmapData:BitmapData = Global.MakeTransparent(SEED_BULLET);<br \/>\n image = new Image(bitmapData);<\/p>\n <p>\t\t\tsuper(x, y, image);<\/p>\n <p>\t\t\tFP.angleXY(this, player.stem.angle, 40, player.x, player.y);<br \/>\n image.angle = player.stem.angle;<br \/>\n image.centerOrigin();<br \/>\n image.smooth = true;<br \/>\n active = false;<br \/>\n layer = 2;\t\t\t<\/p>\n <p>\t\t\tsetHitbox(40, 40);<br \/>\n type = &#8220;seedbullet&#8221;;<\/p>\n <p>\t\t\ttrace(&#8220;created&#8221;);<br \/>\n }<\/p>\n <p>\t\toverride public function update():void<br \/>\n {<br \/>\n trace(&#8220;update&#8221;);<br \/>\n super.update();<\/p>\n <p>\t\t\ttrace(&#8220;update2&#8221;);<br \/>\n if (collide(&#8220;BadPlant&#8221;, x, y))<br \/>\n {<br \/>\n explode();<br \/>\n }<br \/>\n }<\/p>\n <p>\t\toverride public function added():void<br \/>\n {<br \/>\n super.added();<\/p>\n <p>\t\t\tvar time:Number = FP.distance(x, y, world.mouseX, world.mouseY) \/ SPEED;<br \/>\n TweenMax.to(this, time, { x:world.mouseX, y:world.mouseY, ease:Quad.easeOut, onComplete:explode } );<br \/>\n }<\/p>\n <p>\t\tpublic function explode():void<br \/>\n {<br \/>\n world.add(new Explode(this));<br \/>\n world.remove(this);<br \/>\n }<br \/>\n }<br \/>\n }<\/p><\/blockquote>\n \n <p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/bug\/\" rel=\"tag\">bug<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/code\/\" rel=\"tag\">code<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/flashpunk\/\" rel=\"tag\">flashpunk<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/foodphoto\/\" rel=\"tag\">foodphoto<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/screenshot\/\" rel=\"tag\">screenshot<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/sourcecode\/\" rel=\"tag\">sourcecode<\/a><\/p>","time":"April 21st, 2012 12:04 pm","title":"Lunch #1 and Serious Bug"}