Festança flash game

Flash game I did the development on 2010 for Editora Globo, using A* for path finding.
That was one of my first contact with data structures for games.

public class AStar
public class AStar {
   private var graph:Graph;
private var g:Vector.<Number>;
private var h:Vector.<Number>;
private var f:Vector.<Number>;
private var parent:Vector.<int>;
private var open:Vector.<int>;
private var closed:Vector.<int>;
private var goalReached:Boolean = false;
public function AStar(g:Graph) { setGraph(g); }
public function setGraph(graph:Graph):void {
this.graph = graph; updateGraph();
} ....

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s