-
Notifications
You must be signed in to change notification settings - Fork 9
Invincibility Feature Companion
Invincibility grants companion temporary immunity from harm making the health, infinite for 10 seconds, allowing them to navigate treacherous environments, engage formidable foes, or simply savor moments of invulnerability. This mechanic can be a game-changer, offering companion both a sense of empowerment and the opportunity to tackle challenges in novel ways.
Invincibility is employed to give a brief respite from enemy attacks or environmental hazards. For example, companion may become temporarily invincible when a key H is pressed, allowing companion without being harmed further.
ServiceLocator.getGameArea().getCompanion().getComponent(CombatStatsComponent.class).setHealth(maxHealth);
Players have to use the invincibility strategically , because it can only be used once in a game and for only 10 seconds. After 10 seconds the health of companion set back to 50.
Timer.schedule(new Task() {public void run() { ServiceLocator.getGameArea().getCompanion().getComponent(CombatStatsComponent.class).setHealth(50);} }, 10.0f);
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files