A Little project to recreate a Login-Terminal used in some FPS-Games to control the environment, open doors etc. using the Unity UI Interface. It contains a basic Scene where you need to log into a terminal with a PIN-Code (1234) and can then open or close a door, the player view will then zoom into the terminal to use it.
Unity3D Version: 2020.3.3f1 (but will also work with older versions).
The project uses the Standard Assets FPS-Controller, but you should also be able to use your own controller. To make the Player be able to interact with the terminal,
add an PlayerUseLogic
Script to it, this will log into a terminal when standing in front of it using the E-key.
Each Terminal needs a WindowManager
script which manages the start window of the terminal. There are currently 2 implemented types of windows:
LoginWindow
- Manages the login from the users, shows anAccessDenied
orAccessGranted
and then proceeds to the next windowSimpleMenuWindow
- Base container for a standard Window, contains no further logic (all controlled by UI then).
The OnClick
UnityAction from the buttons will then control the door, which contains a MovingDoor
script to control the door.
Others Scripts can also be made interactable by adding the IUseable
Interface to their class.