示例#1
0
 public ShieldPart(GameObjName inName, ColObj inColObj, Vector2 inPos, GameSprite inSprite)
 {
     Name     = inName;
     Position = inPos;
     colObj   = inColObj;
     sprite   = inSprite;
     tempRect = inColObj.getRect();
     Col_Off  = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
 }
示例#2
0
        public Wall(GameObjName inName, ColObj inColObj, Vector2 inPos)
        {
            Name     = inName;
            Position = inPos;
            colObj   = inColObj;
            sprite   = null;

            Rectangle tempRect = inColObj.getRect();

            Col_Off = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
        }
示例#3
0
        public Column(GameObjName inName, ColObj inColObj, Vector2 inPos)
        {
            Name     = inName;
            Position = inPos;
            colObj   = inColObj;
            sprite   = null;

            Aliens = new LinkedList(5, 1, NodeType.GameObj);
            Rectangle tempRect = inColObj.getRect();

            Col_Off = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
        }
        public Super(GameObjName inName, ColObj inColObj, Vector2 inPos)
        {
            Name      = inName;
            Position  = inPos;
            colObj    = inColObj;
            sprite    = null;
            direction = new Vector2(30, 0);

            Columns = new LinkedList(10, 3, NodeType.GameObj);
            Rectangle tempRect = inColObj.getRect();

            Col_Off = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
        }
        public GameObj(GameObjName inName, ColObj inColObj, Vector2 inPos, GameSprite inSprite)
        {
            Name      = inName;
            Position  = inPos;
            colObj    = inColObj;
            sprite    = inSprite;
            direction = Vector2.Zero;

            Rectangle tempRect = inColObj.getRect();

            Col_Off = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
            sprite.setPosition(Position.X, Position.Y);
        }
示例#6
0
        public Alien(GameObjName inName, ColObj inColObj, Vector2 inPos, GameSprite inSprite, int inScore)
        {
            Name     = inName;
            Position = inPos;
            colObj   = inColObj;
            sprite   = inSprite;
            score    = inScore;

            Rectangle tempRect = inColObj.getRect();

            Col_Off = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
            sprite.setPosition(Position.X, Position.Y);
        }
        public Bomb(GameObjName inName, ColObj inColObj, Vector2 inPos, GameSprite inSprite, ColGroupName inTempColGroupName)
        {
            Name             = inName;
            Position         = inPos;
            colObj           = inColObj;
            sprite           = inSprite;
            direction.Y     += 5;
            TempColGroupName = inTempColGroupName;

            Rectangle tempRect = inColObj.getRect();

            Col_Off = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
            sprite.setPosition(Position.X, Position.Y);
        }
        public Shield(GameObjName inName, ColObj inColObj, Vector2 inPos, GameSprite inSprite, ColGroupName inTempColGroupName)
        {
            Name             = inName;
            Position         = inPos;
            colObj           = inColObj;
            sprite           = inSprite;
            direction        = new Vector2(0, 0);
            TempColGroupName = inTempColGroupName;

            ShieldParts = new LinkedList(10, 3, NodeType.GameObj);
            Rectangle tempRect = inColObj.getRect();

            Col_Off = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
            sprite.setPosition(Position.X, Position.Y);
        }
示例#9
0
        public Ship(GameObjName inName, ColObj inColObj, Vector2 inPos, GameSprite inSprite, ColGroupName inTempColGroupName)
        {
            Name             = inName;
            Position         = inPos;
            colObj           = inColObj;
            sprite           = inSprite;
            TempColGroupName = inTempColGroupName;
            lives            = 2;
            score            = 0;

            Rectangle tempRect = inColObj.getRect();

            Col_Off = new Vector2(Position.X - tempRect.X, Position.Y - tempRect.Y);
            sprite.setPosition(Position.X, Position.Y);
        }
 public Rectangle getCollisionObjRectangle()
 {
     return(colObj.getRect());
 }