-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.5.0 Many UI Elements and visual Animations are now not sped up. Fixed ThoughtBubble disappearing to fast Fixed EnemyIntents sometimes not initializing Added visual Indicator on how fast the game is. Added option to not speed up Creatures(Player and Monsters) Some Refactoring
- Loading branch information
Showing
9 changed files
with
183 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
Binary file not shown.
Loading
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package skrelpoid.superfastmode; | ||
|
||
import com.badlogic.gdx.graphics.Color; | ||
import com.badlogic.gdx.graphics.Texture; | ||
import com.badlogic.gdx.graphics.g2d.SpriteBatch; | ||
import com.megacrit.cardcrawl.core.Settings; | ||
|
||
import basemod.IUIElement; | ||
import basemod.ModPanel; | ||
|
||
public class ProgressBar implements IUIElement { | ||
|
||
public ModPanel parent; | ||
public float x, y, width, height, progress; | ||
public Texture texture; | ||
public boolean multiplied; | ||
public float multiplier = 0.2f; | ||
public float start = 0.05f; | ||
|
||
public ProgressBar(ModPanel parent, float x, float y, float width, float height, Texture texture, | ||
boolean multiplied) { | ||
this.parent = parent; | ||
this.x = Settings.scale * x; | ||
this.y = Settings.scale * y; | ||
this.width = Settings.scale * width; | ||
this.height = Settings.scale * height; | ||
this.texture = texture; | ||
this.multiplied = multiplied; | ||
resetProgress(); | ||
} | ||
|
||
public void resetProgress() { | ||
progress = start; | ||
} | ||
|
||
@Override | ||
public void render(SpriteBatch sb) { | ||
sb.setColor(Color.WHITE); | ||
sb.draw(texture, x, y, width * progress, height); | ||
} | ||
|
||
@Override | ||
public void update() { | ||
float updateBy = multiplied ? SuperFastMode.getMultDelta() : SuperFastMode.getDelta(); | ||
progress += updateBy * multiplier; | ||
if (progress > 1f) { | ||
resetProgress(); | ||
} | ||
} | ||
|
||
@Override | ||
public int renderLayer() { | ||
return ModPanel.MIDDLE_LAYER; | ||
} | ||
|
||
@Override | ||
public int updateOrder() { | ||
return ModPanel.DEFAULT_UPDATE; | ||
} | ||
|
||
} |
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
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