PlaceholderGames / 2016-InfiniteReplayGame

A 2D post-apocalyptic run and gun game with a significant resource management element.
0 stars 0 forks source link

Code the gas mask system #9

Closed WilliamAkins closed 7 years ago

WilliamAkins commented 7 years ago

Make the gas mask system. This will have a bar shown in the top left corner of the screen at all times. It will display the current status of the gas mask in percent and the seconds remaining. If possible there should be a dynamic bar which will run out also displaying the status.

Once the time runs out make it so the player is returned to the outpost. If you have a copy of the version with the outpost make it so if you enter and leave the outpost the gas mask filter charge will reset and can be used again.

Due: 31th October

Ryan-Fletcher commented 7 years ago

Uploaded the updated gas mask system. The player dies when the gas mask (timer) runs out, although an error occurs when the player dies. Timer appears only in the middle of the screen and doesn't count down yet.

Ryan-Fletcher commented 7 years ago

Trying to connect the timer on the player to the timer on the scene.

WilliamAkins commented 7 years ago

Hmm, maybe try creating a game attribute called 'Time' or something as it probably needs to be accessed throughout the game.

Ryan-Fletcher commented 7 years ago

The gas mask now appears and counts down the player's time limit.

Ryan-Fletcher commented 7 years ago

Replaced the "Gas Mask" attribute with "GasMaskLevel" and "GasMaskCapacity". This now shows the current and starting time left. When the time limit is up, the scene reverts back to the menu (however an error occurs the first time this happens) and can be repeated with no problems.

Ryan-Fletcher commented 7 years ago

Created a working timer with placeholder timer (needs to be re-positioned).

Ryan-Fletcher commented 7 years ago

Re-positioned the timer to the top right. Added a reset on the timer whenever the player enters a scene (may need to be changed).

Ryan-Fletcher commented 7 years ago

Changed timer from 60 seconds to 90 seconds.