-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGameObjectFactory.java
46 lines (35 loc) · 1.17 KB
/
GameObjectFactory.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package org.academniadecodigo.dancedance.gameobjects;
import org.academiadecodigo.simplegraphics.pictures.Picture;
/**
* Created by codecadet on 20/10/16.
*/
public class GameObjectFactory {
private Arrow arrow;
private Background backPicture;
private Dancer dancer;
private Animations animation;
private HealthBar healthBar;
private FxEffects effects;
public FxEffects createEffects(){ return effects = new FxEffects();}
public FxEffects getEffects(){return effects;}
public HealthBar createHealthBar (){return healthBar = new HealthBar();}
public HealthBar getHealthBar(){return healthBar;}
public Dancer newDancer() {
return dancer = new Dancer();
}
public Dancer getDancer(){
return dancer;
}
public Arrow newArrow() {
return arrow = new Arrow();
}
public Arrow getArrow() {
return arrow;
}
public Background background() {return backPicture = new Background();}
public Background getBackPicture(){return backPicture;}
public Animations createAnimation(){
return animation = new Animations();
}
public Animations getAnimation(){return animation;}
}