-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added projectile class but dont have time to finish
- Loading branch information
john kavanagh
committed
Sep 1, 2015
1 parent
1957bcd
commit a66e3eb
Showing
15 changed files
with
92 additions
and
9 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
bin/dexedLibs/andengine-gles2-1f4172871ccb66856069f5229f51b4fe.jar
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
bin/dexedLibs/andenginephysicsbox2dextension-gles2-c7dc6fdb38ad0d8a8ec832fa0fa5980a.jar
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
bin/dexedLibs/appcompat_v7-e1ceeea49e4ff6e6ca6882136ade5f89.jar
Binary file not shown.
Binary file not shown.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.bawsephighter; | ||
|
||
public class Projectile { | ||
private float x, y, speedX, speedY; | ||
private boolean visible; | ||
|
||
public Projectile(float startX, float startY) { | ||
x = startX; | ||
y = startY; | ||
speedY = -7; | ||
visible = true; | ||
} | ||
|
||
public void update(){ | ||
y += speedY; | ||
if (y < 0) { | ||
visible = false; | ||
} | ||
} | ||
|
||
public float getX() { | ||
return x; | ||
} | ||
|
||
public float getY() { | ||
return y; | ||
} | ||
|
||
public float getSpeedX() { | ||
return speedX; | ||
} | ||
|
||
public boolean isVisible() { | ||
return visible; | ||
} | ||
|
||
public void setX(int x) { | ||
this.x = x; | ||
} | ||
|
||
public void setY(int y) { | ||
this.y = y; | ||
} | ||
|
||
public void setSpeedX(int speedX) { | ||
this.speedX = speedX; | ||
} | ||
|
||
public void setVisible(boolean visible) { | ||
this.visible = visible; | ||
} | ||
} |