Beispiel #1
0
 public Lives(GameObjName inName, Vector2 inPos, GameSprite inSprite)
 {
     Name     = inName;
     Position = inPos;
     colObj   = null;
     sprite   = inSprite;
     sprite.setPosition(Position.X, Position.Y);
 }
        public UI(GameObjName inName, Vector2 inPos, GameSprite inSprite)
        {
            Name     = inName;
            Position = inPos;
            sprite   = inSprite;

            sprite.setPosition(Position.X, Position.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);
        }
Beispiel #4
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);
        }
Beispiel #7
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);
        }