How would I go about fixing these two scripts?

I followed the Tanks! Tutorial and the Survival Shooter tutorial and I decided to combine them to create a single player Tanks! Game. I have everything working, except I don’t know how to change the GameManager and TankManager class to fit my Enemy Tank & Player Tank. In the Tanks Game, both of the classes work since it is calling the same tank in all of the functions, while I have two separate tanks, the player tank and the enemy tank.
Here are the classes. Note, it says OldTankManager because I created another class to experiment so I called the old one OldTankManager.

GameManager.cs:

using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using PlayerInfo;
using EnemyInfo;

namespace Manager
{
    public class GameManager : MonoBehaviour
    {
        public int NumRoundsToWin = 5;            // The number of rounds a single player has to win to win the game.
        public float StartDelay = 3f;             // The delay between the start of RoundStarting and RoundPlaying phases.
        public float EndDelay = 3f;               // The delay between the end of RoundPlaying and RoundEnding phases.
        public CameraControl CameraControl;       // Reference to the CameraControl script for control during different phases.
        public Text MessageText;                  // Reference to the overlay Text to display winning text, etc.
        public GameObject TankPrefab;             // Reference to the prefab the players will control.
        public GameObject EnemyPrefab;
        public OldTankManager[] Tanks;               // A collection of managers for enabling and disabling different aspects of the tanks.


        private int RoundNumber;                  // Which round the game is currently on.
        private WaitForSeconds StartWait;         // Used to have a delay whilst the round starts.
        private WaitForSeconds EndWait;           // Used to have a delay whilst the round or game ends.
        private OldTankManager RoundWinner;          // Reference to the winner of the current round.  Used to make an announcement of who won.
        private OldTankManager GameWinner;           // Reference to the winner of the game.  Used to make an announcement of who won.


        private void Start()
        {
            // Create the delays so they only have to be made once.
            StartWait = new WaitForSeconds (StartDelay);
            EndWait = new WaitForSeconds (EndDelay);

            SpawnAllTanks();
            SetCameraTargets();

            // Once the tanks have been created and the camera is using them as targets, start the game.
            StartCoroutine (GameLoop ());
        }


        private void SpawnAllTanks()
        {
            // For all the tanks...
            for (int i = 0; i < Tanks.Length; i++)
            {
                // ... create them, set their player number and references needed for control.
                Tanks[i].Instance =
                    Instantiate(TankPrefab, Tanks[i].SpawnPoint.position, Tanks[i].SpawnPoint.rotation) as GameObject;
                Tanks[i].PlayerNumber = i + 1;
                Tanks[i].Setup();
            }
        }


        private void SetCameraTargets()
        {
            // Create a collection of transforms the same size as the number of tanks.
            Transform[] targets = new Transform[Tanks.Length];

            // For each of these transforms...
            for (int i = 0; i < targets.Length; i++)
            {
                // ... set it to the appropriate tank transform.
                targets[i] = Tanks[i].Instance.transform;
            }

            // These are the targets the camera should follow.
            CameraControl.Targets = targets;
        }


        // This is called from start and will run each phase of the game one after another.
        private IEnumerator GameLoop ()
        {
            // Start off by running the 'RoundStarting' coroutine but don't return until it's finished.
            yield return StartCoroutine (RoundStarting ());

            // Once the 'RoundStarting' coroutine is finished, run the 'RoundPlaying' coroutine but don't return until it's finished.
            yield return StartCoroutine (RoundPlaying());

            // Once execution has returned here, run the 'RoundEnding' coroutine, again don't return until it's finished.
            yield return StartCoroutine (RoundEnding());

            // This code is not run until 'RoundEnding' has finished.  At which point, check if a game winner has been found.
            if (GameWinner != null)
            {
                // If there is a game winner, restart the level.
                Application.LoadLevel (Application.loadedLevel);
            }
            else
            {
                // If there isn't a winner yet, restart this coroutine so the loop continues.
                // Note that this coroutine doesn't yield.  This means that the current version of the GameLoop will end.
                StartCoroutine (GameLoop ());
            }
        }


        private IEnumerator RoundStarting ()
        {
            // As soon as the round starts reset the tanks and make sure they can't move.
            ResetAllTanks ();
            DisableTankControl ();

            // Snap the camera's zoom and position to something appropriate for the reset tanks.
            CameraControl.SetStartPositionAndSize ();

            // Increment the round number and display text showing the players what round it is.
            RoundNumber++;
            MessageText.text = "ROUND " + RoundNumber;

            // Wait for the specified length of time until yielding control back to the game loop.
            yield return StartWait;
        }


        private IEnumerator RoundPlaying ()
        {
            // As soon as the round begins playing let the players control the tanks.
            EnableTankControl ();

            // Clear the text from the screen.
            MessageText.text = string.Empty;

            // While there is not one tank left...
            while (!OneTankLeft())
            {
                // ... return on the next frame.
                yield return null;
            }
        }


        private IEnumerator RoundEnding ()
        {
            // Stop tanks from moving.
            DisableTankControl ();

            // Clear the winner from the previous round.
            RoundWinner = null;

            // See if there is a winner now the round is over.
            RoundWinner = GetRoundWinner ();

            // If there is a winner, increment their score.
            if (RoundWinner != null)
                RoundWinner.Wins++;

            // Now the winner's score has been incremented, see if someone has one the game.
            GameWinner = GetGameWinner ();

            // Get a message based on the scores and whether or not there is a game winner and display it.
            string message = EndMessage ();
            MessageText.text = message;

            // Wait for the specified length of time until yielding control back to the game loop.
            yield return EndWait;
        }


        // This is used to check if there is one or fewer tanks remaining and thus the round should end.
        private bool OneTankLeft()
        {
            // Start the count of tanks left at zero.
            int numTanksLeft = 0;

            // Go through all the tanks...
            for (int i = 0; i < Tanks.Length; i++)
            {
                // ... and if they are active, increment the counter.
                if (Tanks[i].Instance.activeSelf)
                    numTanksLeft++;
            }

            // If there are one or fewer tanks remaining return true, otherwise return false.
            return numTanksLeft <= 1;
        }


        // This function is to find out if there is a winner of the round.
        // This function is called with the assumption that 1 or fewer tanks are currently active.
        private OldTankManager GetRoundWinner()
        {
            // Go through all the tanks...
            for (int i = 0; i < Tanks.Length; i++)
            {
                // ... and if one of them is active, it is the winner so return it.
                if (Tanks[i].Instance.activeSelf)
                    return Tanks[i];
            }

            // If none of the tanks are active it is a draw so return null.
            return null;
        }


        // This function is to find out if there is a winner of the game.
        private OldTankManager GetGameWinner()
        {
            // Go through all the tanks...
            for (int i = 0; i < Tanks.Length; i++)
            {
                // ... and if one of them has enough rounds to win the game, return it.
                if (Tanks[i].Wins == NumRoundsToWin)
                    return Tanks[i];
            }

            // If no tanks have enough rounds to win, return null.
            return null;
        }


        // Returns a string message to display at the end of each round.
        private string EndMessage()
        {
            // By default when a round ends there are no winners so the default end message is a draw.
            string message = "DRAW!";

            // If there is a winner then change the message to reflect that.
            if (RoundWinner != null)
                message = RoundWinner.ColoredPlayerText + " WINS THE ROUND!";

            // Add some line breaks after the initial message.
            message += "\n\n\n\n";

            // Go through all the tanks and add each of their scores to the message.
            for (int i = 0; i < Tanks.Length; i++)
            {
                message += Tanks[i].ColoredPlayerText + ": " + Tanks[i].Wins + " WINS\n";
            }

            // If there is a game winner, change the entire message to reflect that.
            if (GameWinner != null)
                message = GameWinner.ColoredPlayerText + " WINS THE GAME!";

            return message;
        }


        // This function is used to turn all the tanks back on and reset their positions and properties.
        private void ResetAllTanks()
        {
            for (int i = 0; i < Tanks.Length; i++)
            {
                Tanks[i].Reset();
            }
        }


        private void EnableTankControl()
        {
            for (int i = 0; i < Tanks.Length; i++)
            {
                Tanks[i].EnableControl();
            }
        }


        private void DisableTankControl()
        {
            for (int i = 0; i < Tanks.Length; i++)
            {
                Tanks[i].DisableControl();
            }
        }
    }
}

OldTankManager.cs

using System;
using UnityEngine;
using PlayerInfo;
using EnemyInfo;

namespace Manager
{
    public class OldTankManager
    {
        // This class is to manage various settings on a tank.
        // It works with the GameManager class to control how the tanks behave
        // and whether or not players have control of their tank in the
        // different phases of the game.

        public Color PlayerColor;                             // This is the color this tank will be tinted.
        public Transform SpawnPoint;                          // The position and direction the tank will have when it spawns.
        [HideInInspector] public int PlayerNumber;            // This specifies which player this the manager for.
        [HideInInspector] public string ColoredPlayerText;    // A string that represents the player with their number colored to match their tank.
        [HideInInspector] public GameObject Instance;         // A reference to the instance of the tank when it is created.
        [HideInInspector] public int Wins;                    // The number of wins this player has so far.


        private PlayerMovement Movement;                        // Reference to tank's movement script, used to disable and enable control.
        private PlayerAttack Shooting;                        // Reference to tank's shooting script, used to disable and enable control.
        private GameObject CanvasGameObject;                  // Used to disable the world space UI during the Starting and Ending phases of each round.


        public void Setup ()
        {
            // Get references to the components.
            Movement = Instance.GetComponent<PlayerMovement> ();
            Shooting = Instance.GetComponent<PlayerAttack> ();
            CanvasGameObject = Instance.GetComponentInChildren<Canvas> ().gameObject;

            // Set the player numbers to be consistent across the scripts.
            Movement.PlayerNumber = PlayerNumber;
            Shooting.PlayerNumber = PlayerNumber;

            // Create a string using the correct color that says 'PLAYER 1' etc based on the tank's color and the player's number.
            ColoredPlayerText = "<color=#" + ColorUtility.ToHtmlStringRGB(PlayerColor) + ">PLAYER " + PlayerNumber + "</color>";

            // Get all of the renderers of the tank.
            MeshRenderer[] renderers = Instance.GetComponentsInChildren<MeshRenderer> ();

            // Go through all the renderers...
            for (int i = 0; i < renderers.Length; i++)
            {
                // ... set their material color to the color specific to this tank.
                renderers[i].material.color = PlayerColor;
            }
        }


        // Used during the phases of the game where the player shouldn't be able to control their tank.
        public void DisableControl ()
        {
            Movement.enabled = false;
            Shooting.enabled = false;

            CanvasGameObject.SetActive (false);
        }


        // Used during the phases of the game where the player should be able to control their tank.
        public void EnableControl ()
        {
            Movement.enabled = true;
            Shooting.enabled = true;

            CanvasGameObject.SetActive (true);
        }


        // Used at the start of each round to put the tank into it's default state.
        public void Reset ()
        {
            Instance.transform.position = SpawnPoint.position;
            Instance.transform.rotation = SpawnPoint.rotation;

            Instance.SetActive (false);
            Instance.SetActive (true);
        }
    }
}

The problem I have is none of the functions in the GameManager class, that are necessary to getting the game to run and keep score and reset when need to, work for my game since I am using two different Prefabs. I have tried creating an EnemyTankManager and a PlayerTankManager, but the GameManager class is shoving them into one array (Tanks[ ]), and I even tried making two separate EnemyTanks[ ] and PlayerTanks[ ], but when it gets to the OneTankLeft () function and other functions, I don’t understand how to recode it to make it work.

If you wouldn’t mind going over the code and trying to help me out, that would be great! I will post all of the other classes that are in the game on pastebin and upload the link in the next comment.

Here is the link to my Pastebin which has all of the other classes in it

Also, Here is a link to the project folder just incase you would like to test anything.

Could anyone help possibly?

Anyone care to help?

Bumping. Looking for Help!

Seems to me that all you need to do is adjust lines 49/50 of Manager to allow different prefabs to be spawned? I’m not sure what your logic would be there, but basically:

 if (thisTankShouldBePlayer == true) {
Tanks[i].Instance = (GameObject)Instantiate(PlayerTankPrefab, etc, etc);
}
else {
Tanks[i].Instance = (GameObject)Instantiate(EnemyTankPrefab, etc, etc);
}

On the thisTankShouldBePlayer, how can I set that up to determine whether or not that is the player tank or enemy tank?

I don’t know. May be as simple as “if (i==0)” if you just want the first-indexed tank to be the player?