Skip to content

Commit

Permalink
This is a manual commit to update master to the demo. Undoing this co…
Browse files Browse the repository at this point in the history
…mmit should return master to its previous state.
  • Loading branch information
NoahSefcik committed Apr 12, 2016
1 parent 1d919be commit f3338a8
Show file tree
Hide file tree
Showing 18 changed files with 4,840 additions and 224 deletions.
74 changes: 74 additions & 0 deletions HighScores
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
1000-Player A
2000-Player B
5000-Player C
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
500-New Name
2 changes: 1 addition & 1 deletion nbproject/UPDATED.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Project RocketDog build script updated
Project build script file jfx-impl.xml in nbproject sub-directory has not been recognized
as compliant with this version of NetBeans JavaFX support module. To ensure correct
and complete functionality within this NetBeans installation the script file has been
backed up to jfx-impl_backup_4.xml and then updated to the currently supported state.
backed up to jfx-impl_backup_5.xml and then updated to the currently supported state.

FX Project build script auto-update may be triggered on project open either after
NetBeans installation update or by manual changes in jfx-impl.xml. Please note that
Expand Down
3 changes: 1 addition & 2 deletions nbproject/jfx-impl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3678,7 +3678,6 @@
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
<jvmarg value="-Dglass.disableGrab=true"/>
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
<jvmarg line="${run.jvmargs}"/>
Expand Down Expand Up @@ -3817,7 +3816,7 @@
<target name="-debug-javaws-debuggee" depends="-init-debug-args">
<echo message="Executing ${jfx.deployment.jnlp} in debug mode using ${active.webstart.executable}"/>
<exec executable="${active.webstart.executable}">
<env key="JAVAWS_VM_ARGS" value="${debug-args-line} -Xrunjdwp:transport=${debug-transport},address=${jpda.address} -Dglass.disableGrab=true"/>
<env key="JAVAWS_VM_ARGS" value="${debug-args-line} -Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
<arg value="-wait"/>
<arg file="${jfx.deployment.jnlp}"/>
</exec>
Expand Down
4,008 changes: 4,008 additions & 0 deletions nbproject/jfx-impl_backup_5.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void handleKeyPressed(RocketDogController rdController, Level currentLeve
currentLevel.setVisibleHitBoxes(!currentLevel.getVisibleHitBoxes());
break;
case P:
currentLevel.setDone(true);
currentLevel.addAidItem(new HealthItem(new Point2D(100, 100)), 56, 56);
break;
case O:
//game.displayOptionsScreen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void setMaxRange(double maxRange) {
public boolean attack(TangibleEntity target) {
double distance = controlledObject.getPosition().distance(target.getPosition());
if (target instanceof Attackable && Math.abs(distance) < maxRange
&& Math.abs(distance) > minRange) {
&& Math.abs(distance) > minRange && !target.isImmune()) {
Point2D velocity = target.getPosition()
.subtract(controlledObject.getPosition())
.normalize()
Expand Down
5 changes: 2 additions & 3 deletions src/edu/uco/sdd/rocketdog/controller/RocketDogGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import org.scenicview.ScenicView;

public class RocketDogGame extends Application {

Expand All @@ -47,7 +46,7 @@ public void init() {
*/
levels = new String[]{
//"Test",
//"Splash",
"Splash",
//"One",
"Two"
};
Expand All @@ -68,7 +67,7 @@ public void start(Stage primaryStage) {
primaryStage.setMaxWidth(GAME_SCREEN_WIDTH);
primaryStage.setMaxHeight(GAME_SCREEN_HEIGHT);
primaryStage.setScene(currentLevel);
ScenicView.show(currentLevel);
//ScenicView.show(currentLevel);
primaryStage.show();
primaryStage.setOnCloseRequest((WindowEvent t) -> {
Platform.exit();
Expand Down
32 changes: 18 additions & 14 deletions src/edu/uco/sdd/rocketdog/model/DeliveryMan.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,26 @@ public DeliveryMan(double x, double y){

this.setMultiHibox(true);
hitboxes = new ArrayList();
Hitbox hitbox = new Hitbox(this.getPosition().getX(), this.getPosition().getY());
hitbox.setWidth(400);
Hitbox hitbox = new Hitbox(this.getSprite().getTranslateX(), this.getSprite().getTranslateX());
hitbox.setWidth(350);
hitbox.setHeight(100);
hitbox.setOffsetX(10);
hitbox.setOffsetY(250);
hitboxes.add(hitbox);
Hitbox nhitbox = new Hitbox(this.getPosition().getX(), this.getPosition().getY());
Hitbox nhitbox = new Hitbox(this.getSprite().getTranslateX(), this.getSprite().getTranslateX());
nhitbox.setWidth(100);
nhitbox.setHeight(300);
nhitbox.setHeight(250);
nhitbox.setOffsetX(250);
nhitbox.setOffsetY(10);
hitboxes.add(nhitbox);
setHitboxes(hitboxes);
Hitbox nnhitbox = new Hitbox(this.getSprite().getTranslateX(), this.getSprite().getTranslateX());
nnhitbox.setWidth(125);
nnhitbox.setHeight(125);
nnhitbox.setOffsetX(125);
nnhitbox.setOffsetY(125);
hitboxes.add(nnhitbox);
setHitboxes(hitboxes);

entityClass = new EntityClass("Enemy");
PatrolController controller = new PatrolController(this);
Expand All @@ -79,19 +86,16 @@ public void update(){
getSprite().setScaleX(1);
hitboxes.get(1).setOffsetX(250);
}
getSprite().setTranslateX(getPosition().getX());
getSprite().setTranslateY(getPosition().getY());
hitboxes.forEach((hitbox) -> {
hitbox.setTranslateX(getPosition().getX());
hitbox.setTranslateY(getPosition().getY());
hitbox.resize(this);
super.update();
});
getSprite().setViewport(animating.getCurrentView());
handle(); // Animations*/
setPosition(new Point2D(getPosition().getX(),getPosition().getY()));
if (getLevel().getRocketDog().getPosition().getX() > this.getPosition().getX()){
Expand All @@ -102,17 +106,17 @@ public void update(){
getSprite().setLayoutX(getPosition().getX());
getSprite().setLayoutY(getPosition().getY());

getHitbox().setLayoutX(getPosition().getX());
getHitbox().setLayoutY(getPosition().getY());
//getHitbox().setLayoutX(getPosition().getX());
//getHitbox().setLayoutY(getPosition().getY());

getSprite().setViewport(animating.getCurrentView());

hitboxes.forEach((hitbox) -> {
hitbox.setTranslateX(getSprite().getTranslateX());
hitbox.setTranslateY(getSprite().getTranslateY());
hitbox.setLayoutX(this.getSprite().getLayoutX());
hitbox.setLayoutY(this.getSprite().getLayoutY());
hitbox.resize(this);
});

handle(); // Animations
}

Expand Down Expand Up @@ -158,4 +162,4 @@ public Rectangle2D getCurrentView() {
public Image getImage() {
return animating.getImage();
}
}
}
52 changes: 52 additions & 0 deletions src/edu/uco/sdd/rocketdog/model/HealthBar.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.uco.sdd.rocketdog.model;

import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.StrokeType;

/**
*
* @author Sophia
*/
public class HealthBar extends Pane {
Rectangle healthBarBorder;
Rectangle innerHealthBar;
double height;
double outerHealthBarWidth;
double innerhealthBarWidth;

public HealthBar() {
this.height=10;
this.outerHealthBarWidth=60;
this.innerhealthBarWidth=50;

double posX=0.0;
double posY=0.0;

healthBarBorder= new Rectangle(posX, posY, outerHealthBarWidth, height);//healthbar outline

healthBarBorder.setArcHeight(5);
healthBarBorder.setArcWidth(5);

healthBarBorder.setStroke(Color.BLACK);
healthBarBorder.setWidth(2);
healthBarBorder.setStrokeType(StrokeType.OUTSIDE);
healthBarBorder.setFill(Color.RED);

innerHealthBar= new Rectangle(posX, posY,innerhealthBarWidth , height);// draws healthbar
innerHealthBar.setStrokeType(StrokeType.OUTSIDE);
innerHealthBar.setFill(Color.GREEN);

getChildren().addAll(healthBarBorder,innerHealthBar);

}



}
Loading

0 comments on commit f3338a8

Please sign in to comment.