Game Development Reference
In-Depth Information
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.*;
import com.efg.framework.CustomEventSound;
import com.efg.framework.Game;
import com.efg.framework.CustomEventLevelScreenUpdate;
import com.efg.framework.CustomEventScoreBoardUpdate;
import com.efg.framework.CustomEventSound;
import com.efg.framework.BlitSprite;
import com.efg.framework.TileByTileBlitSprite;
import com.efg.framework.TileSheet;
/**
* ...
* @author Jeff Fulton
*/
public class NoTanks extends Game {
Adding the new NoTanks.as variables
Add these variables to the variable definition section:
public static const EXPLODE_SMALL:int = 0;
public static const EXPLODE_LARGE:int = 1;
//game specific
private var score:int;
private var lives:int;
private var ammo:int;
private var playerStartLives:int = 2;
private var playerStartAmmo:int = 50;
private var playerStartHealthpoints:int = 5;
private var scoreEnemy:int = 25;
private var scoreGoal:int = 50;
//game loop
private var gameOver:Boolean = false;
//goal
private var goalReached:Boolean = false;
private var goalSprite:BlitSprite;
//level specific
private var enemyIntelligence:int;
private var enemyShotDelay:int;
private var enemyShotSpeed:int;
private var enemyHealthPoints:int;
//hit detection
private var playerHitPoint:Point = new Point(0, 0);
private var enemyHitPoint:Point = new Point(0, 0);
private var missileHitPoint:Point = new Point(0, 0);
Search WWH ::




Custom Search