Ludum Dare 34
Coming December 11th-14th Weekend

Lunch #1 and Serious Bug

Posted by (twitter: @xMrPhil)
April 21st, 2012 12:04 pm

Lunch 1
It’s almost 3 pm here in Arlington, VA and I’m having my first lunch for LD23. Kind of late but I wait until I’m hungry.

Chicken and Vegetable stir-fry.
Lunch 1

Screenshot 3
It’s coming a long, but I’m feeling the pressure. My task list seems too long. Worst part is I’ve hit a bug! Maybe you can help? My FlashPunk Entity is not calling the Update method! I’ve triple checked and the World Update is being called and calling the supper.Update()!

package SeedsOfDestruction
import com.greensock.easing.Cubic;
import com.greensock.easing.Quad;
import com.greensock.TweenMax;
import flash.display.BitmapData;
import net.flashpunk.Entity;
import net.flashpunk.FP;

public class SeedBullet extends Entity
[Embed(source = “/assets/Seed Bullet.png”)] public static const SEED_BULLET:Class;

public static const SPEED:Number = 200;

public var image:Image;

public function SeedBullet(player:Player)
// Make the Pink transparent
var bitmapData:BitmapData = Global.MakeTransparent(SEED_BULLET);
image = new Image(bitmapData);

super(x, y, image);

FP.angleXY(this, player.stem.angle, 40, player.x, player.y);
image.angle = player.stem.angle;
image.smooth = true;
active = false;
layer = 2;

setHitbox(40, 40);
type = “seedbullet”;


override public function update():void

if (collide(“BadPlant”, x, y))

override public function added():void

var time:Number = FP.distance(x, y, world.mouseX, world.mouseY) / SPEED;, time, { x:world.mouseX, y:world.mouseY, ease:Quad.easeOut, onComplete:explode } );

public function explode():void
world.add(new Explode(this));

Tags: , , , , ,

One Response to “Lunch #1 and Serious Bug”

  1. MrPhil says:

    I FOUND it!!!

    active = false; // This tells it NOT to update.

    active property
    public var active:Boolean = false
    If the graphic should update.

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]