Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the enemy, refactored player drawing
- Loading branch information
1 parent
4a2ff24
commit 1e86d0a
Showing
9 changed files
with
78 additions
and
18 deletions.
There are no files selected for viewing
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
22 changes: 22 additions & 0 deletions
22
core/src/com/coldwild/dodginghero/logic/objects/Enemy.java
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,22 @@ | ||
package com.coldwild.dodginghero.logic.objects; | ||
|
||
import com.badlogic.gdx.graphics.g2d.Sprite; | ||
import com.badlogic.gdx.graphics.g2d.SpriteBatch; | ||
import com.coldwild.dodginghero.Resources; | ||
import com.coldwild.dodginghero.graph.SizeEvaluator; | ||
|
||
/** | ||
* Created by comrad_gremlin on 9/12/2016. | ||
*/ | ||
public class Enemy extends Sprite { | ||
public Enemy(Resources res) | ||
{ | ||
set(res.enemy); | ||
} | ||
|
||
public void draw(SpriteBatch batch, SizeEvaluator sizeEvaluator) | ||
{ | ||
setPosition(sizeEvaluator.getEnemyX(this), sizeEvaluator.getEnemyY(this)); | ||
super.draw(batch); | ||
} | ||
} |
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