We modified one of Unity's sample games, called Survival Shooter, to allow human heart rate to control the speed of movement in the game. Two scripts were modified, and also, a new HeartBPM.cs script was added to the Player object in the scene.
Read the INSTRUCTIONS.docx to checkout or modify this game. There are a lot of useful information.
C#, .NET Framework, Unity2D, Raspberry Pi, and Heartbeat Sensor.
Check out our code in the locations listed below:
Modified_Survival_Shooter_Game/Assets/_Complete-Game/Scripts/Player/HeartBPM.cs
Modified_Survival_Shooter_Game/Assets/_Complete-Game/Scripts/Player/PlayerMovement.cs
Modified_Survival_Shooter_Game/Assets/_Complete-Game/Scripts/Managers/EnemyManager.cs