Asylum – Developer Diary Day 38 and 39

Yesterday was quite a short dev day because of other things I needed to do; that said I did prep up the keypad model for the double door (shown the other day) and started to put together the GUI interface for the player to enter the unlock code for the door.

Today, however, was much more successful. After reworking the keypad texture to show the LCD panel and a cancel button I added in the buttons and coded a script that would be able to drive all the numeric keys and the cancel button. This involved multiple GameObjects communicating with each other; the buttons telling the LCD panel to display the newly entered code, then checking the code to see if it was the correct one, and finally if it was the correct code tell the double door GameObject to animate open.

In adding in this second GUI item I realised that the previous code for the ‘examine object’ GUI wasn’t going to sit nicely with the keypad so I needed to go back to that and just alter the code slightly to all for multiple GUI elements.

Next up is definitely going to be the reception room and janitor’s closet for this floor as it will be needed so the player can actually find the code for the door.