@@ -143,28 +143,28 @@ public Entity newGreenDino(SpawnData data) {
143143 * spawn random coin on the window
144144 */
145145
146- @ Spawns ("coin" )
147- public Entity newCoin (SpawnData data ) {
148- System .out .println ("Loading coin texture: " + GameConstants .COIN_IMAGE_FILE );
149- return entityBuilderBase (data , EntityType .COIN )
150- .with (new OffscreenCleanComponent ())
151- .view (texture (GameConstants .COIN_IMAGE_FILE , 40 , 40 ))
152- .bbox (new HitBox (BoundingShape .box (40 , 40 )))
153- .collidable ()
154- .with (new CoinComponent ())
155- .build ();
156- }
146+ @ Spawns ("coin" )
147+ public Entity newCoin (SpawnData data ) {
148+ System .out .println ("Loading coin texture: " + GameConstants .COIN_IMAGE_FILE );
149+ return entityBuilderBase (data , EntityType .COIN )
150+ .with (new OffscreenCleanComponent ())
151+ .view (texture (GameConstants .COIN_IMAGE_FILE , 40 , 40 ))
152+ .bbox (new HitBox (BoundingShape .box (40 , 40 )))
153+ .collidable ()
154+ .with (new CoinComponent ())
155+ .build ();
156+ }
157157
158- @ Spawns ("redDino" )
159- public Entity newRedDino (SpawnData data ) {
160- return entityBuilderBase (data , EntityType .RED_DINO )
161- .with (new OffscreenCleanComponent ())
162- .view (texture (GameConstants .RED_DINO_IMAGE_FILE , 100 , 80 ))
163- .bbox (new HitBox (BoundingShape .box (65 , 55 )))
164- .collidable ()
165- .with (new RedDinoComponent ())
166- .build ();
167- }
158+ @ Spawns ("redDino" )
159+ public Entity newRedDino (SpawnData data ) {
160+ return entityBuilderBase (data , EntityType .RED_DINO )
161+ .with (new OffscreenCleanComponent ())
162+ .view (texture (GameConstants .RED_DINO_IMAGE_FILE , 100 , 80 ))
163+ .bbox (new HitBox (BoundingShape .box (65 , 55 )))
164+ .collidable ()
165+ .with (new RedDinoComponent ())
166+ .build ();
167+ }
168168
169169 @ Spawns ("healthBar" )
170170 public Entity newHealthbar (SpawnData data ) {
@@ -176,36 +176,36 @@ public Entity newHealthbar(SpawnData data) {
176176 .build ();
177177 }
178178
179- /**
180- * Summary :
181- * Spawn of a heart in the window will be handled in below Entity
182- */
183- @ Spawns ("heart" )
184- public Entity newHeart (SpawnData data ) {
185- System .out .println ("Loading heart texture: " + GameConstants .HEART_IMAGE_FILE );
186- return entityBuilderBase (data , EntityType .HEART )
187- .with (new OffscreenCleanComponent ())
188- .view (texture (GameConstants .HEART_IMAGE_FILE ))
189- .bbox (new HitBox (BoundingShape .box (22 , 22 )))
190- .collidable ()
191- .with (new Heart ())
192- .build ();
193- }
179+ /**
180+ * Summary :
181+ * Spawn of a heart in the window will be handled in below Entity
182+ */
183+ @ Spawns ("heart" )
184+ public Entity newHeart (SpawnData data ) {
185+ System .out .println ("Loading heart texture: " + GameConstants .HEART_IMAGE_FILE );
186+ return entityBuilderBase (data , EntityType .HEART )
187+ .with (new OffscreenCleanComponent ())
188+ .view (texture (GameConstants .HEART_IMAGE_FILE ))
189+ .bbox (new HitBox (BoundingShape .box (22 , 22 )))
190+ .collidable ()
191+ .with (new Heart ())
192+ .build ();
193+ }
194194
195- /**
196- * Summary :
197- * Setting up the Score will be handled in below Entity
198- */
199- @ Spawns ("Score" )
200- public Entity newScore (SpawnData data ) {
201- Text scoreText = new Text ("" );
202- scoreText .setFill (Color .GREEN );
203- scoreText .setFont (Font .font (GameConstants .ARCADE_CLASSIC_FONTNAME , 20 ));
204- return entityBuilderBase (data , EntityType .SCORE )
205- .view (scoreText )
206- .with (new ScoreComponent ())
207- .with (new OffscreenCleanComponent ()).build ();
208- }
195+ /**
196+ * Summary :
197+ * Setting up the Score will be handled in below Entity
198+ */
199+ @ Spawns ("Score" )
200+ public Entity newScore (SpawnData data ) {
201+ Text scoreText = new Text ("" );
202+ scoreText .setFill (Color .GREEN );
203+ scoreText .setFont (Font .font (GameConstants .ARCADE_CLASSIC_FONTNAME , 20 ));
204+ return entityBuilderBase (data , EntityType .SCORE )
205+ .view (scoreText )
206+ .with (new ScoreComponent ())
207+ .with (new OffscreenCleanComponent ()).build ();
208+ }
209209
210210 /**
211211 * Summary :
@@ -270,7 +270,7 @@ public Entity newExplosion(SpawnData data) {
270270 @ Spawns ("Level" )
271271 public Entity newLevel (SpawnData data ) {
272272 Text levelText = new Text ("Level: 1" );
273- levelText .setFill (Color .YELLOW );
273+ levelText .setFill (Color .LIGHTBLUE );
274274 levelText .setTranslateX (10 );
275275 levelText .setFont (
276276 Font .font (GameConstants .ARCADE_CLASSIC_FONTNAME , GameConstants .TEXT_SIZE_GAME_DETAILS ));
0 commit comments