This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check to see if an object is within radius of another. | |
* @param x1 object1 | |
* @param y1 object1 | |
* @param x2 object2 | |
* @param y2 object2 | |
* @param radius Size of the radius, which is usually | |
* @return returns true if object2 is within radius of object 1 | |
* @example if (InRadius(player.x,player.y,enemy.x,enemy.y,100)) trace ("enemy within a 100 pixel radius of player"); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Searches the map for tiles then adds them to the stage | |
* @param map | |
* @param l | |
* @return | |
*/ | |
private static function scanMapByTileOnLayer(map:Map,l:DataTileLayer):Array | |
{ | |
var newTiles:Array = new Array(); | |
var tileIndex:int = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ... | |
* @author Matt McFarland | |
*/ | |
internal class ObjectLayerArchitect | |
{ | |
/** | |
* Turns loaded data into entities. | |
* @param map map class to load |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static function drawPolygon(map:Map, rect:Rectangle):Vector.<Point> | |
{ | |
var tileWidth:int = map._tileWidth; | |
var tileHeight:int = map._tileHeight; | |
var topRight:Point = tileToPixelCoords(map, new Point(rect.width,0)); | |
var bottomRight:Point = tileToPixelCoords(map, rect.bottomRight); | |
var bottomLeft:Point = tileToPixelCoords(map, new Point(0,rect.bottom)); | |
var polygon:Vector.<Point> = new Vector.<Point>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (checkDomain(["flashgamelicense.com"])) | |
public function checkDomain (allowed:*):Boolean | |
{ | |
var url:String = FP.stage.loaderInfo.url; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import net.flashpunk.Entity; | |
import net.flashpunk.Sfx; | |
import net.flashpunk.tweens.misc.ColorTween; | |
import net.flashpunk.tweens.misc.VarTween; | |
import net.flashpunk.graphics.Image; | |
import flash.filters.GlowFilter; | |
import flash.display.BitmapData; | |
import flash.geom.Rectangle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package campaign.Action | |
{ | |
import adobe.utils.CustomActions; | |
import campaign.Action.Objects.Roid; | |
import campaign.Galaxy.galaxymap; | |
import com.bit101.components.NumericStepper; | |
import editor.edUI; | |
import flash.utils.ByteArray; | |
import net.flashpunk.Entity; | |
import flash.events.Event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package base | |
{ | |
import net.flashpunk.Entity; | |
import net.flashpunk.Sfx; | |
import net.flashpunk.tweens.misc.ColorTween; | |
import net.flashpunk.tweens.misc.VarTween; | |
import net.flashpunk.graphics.Image; | |
import flash.filters.GlowFilter; | |
import flash.display.BitmapData; | |
import flash.geom.Rectangle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package campaign.Upgrade | |
{ | |
import adobe.utils.CustomActions; | |
import campaign.btnTab; | |
import net.flashpunk.graphics.Image; | |
import net.flashpunk.graphics.Spritemap; | |
import net.flashpunk.graphics.Text; | |
import net.flashpunk.tweens.misc.VarTween; | |
import net.flashpunk.World; | |
import net.flashpunk.Entity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package campaign | |
{ | |
import campaign.Galaxy.galaxymap; | |
import campaign.Tutorial.dummyWindow; | |
import campaign.Upgrade.upgradeMenu; | |
import net.flashpunk.Entity; | |
import net.flashpunk.graphics.Graphiclist; | |
import net.flashpunk.graphics.Image; | |
import net.flashpunk.graphics.Spritemap; | |
import net.flashpunk.FP; |
OlderNewer