[Description]
This is a local multiplayer turn game inspired by class sniper in Trench Run game and Worms games. I used this project in classes that I taught at Senac Itaquera college of online multiplayer games.

 This version does not work online multiplayer

[How to play]

  • [A-D] Left and Right Movement
  • [Q-E] Change costume
  • [right Click] Activate/Desactivate Aim
  • [left Click] Shoot

[The Radar]

When you jump, shoot and walk without being disguised makes noise and appears on the radar. Keep an eye on him to see where your enemies are positioned

[The Stamina]

When you move or jump your character loses some of his stamina if it runs out you lose your time, keep an eye on the stamina bar

-------------------------------------------------------------------------------------------------------

[Moviment] 

The player controller is very simple, controlling the turn and the states that the player can execute, being of shot and of movement I used navmesh on the characters, so I can limit the character's movement better.

 

Turn

To control the turn of the enemies I have a controller that checks the "life" of the turn (which would be the player's stamina), if it is less than or equal to 0 the controller player goes to the next character
    int actualPlayerIndex = 0;
        ...
    if(players[actualPlayerIndex].GetTurnLife() <= 0.0f){
         ChangePlayerTurn(); 
     } else{
         life.fillAmount = (players[actualPlayerIndex].GetTurnLife() / 100);
     }
        ...
    public void ChangePlayerTurn (){
        //Player antigo
        if(players[actualPlayerIndex].GetAlive()){
            players[actualPlayerIndex].ChangeMyTurn(false);
            players[actualPlayerIndex].SetTurnLife(100);
        }else{
            //Caso o player anterior esteja morto
            //Codigo aqui
        }
        //Verifico se o player foi realmente modificado [bug fix]
        ChangePlayer();
        ///Ativa player novo
        ActivatePlayer()
    }

All scripts are available for download bellow


Download

Download
SniperTurn.rar 15 MB
Download
Scripts.rar 17 kB