Inheritance: MonoBehaviour
Exemplo n.º 1
0
    void Start()
    {
        pHud  = GetComponent <PlayerHUD>();
        death = GetComponent <Death>();
        if (photonView.IsMine)
        {
            dataManager = GetComponent <PlayerControllerLoader>().inGameDataManager;
        }

        // see if the player has the Resilience skill
        SkillLevel resilienceLevel = GetComponent <PlayerControllerLoader>().skillManager.GetSkillByName("Resilience");

        if (resilienceLevel != null)
        {
            // they have it, so set it
            skillModifier = resilienceLevel.Modifier;
            Debug.Log("Player has Resilience, modifier is: " + skillModifier);
        }
        else
        {
            Debug.Log("Player does NOT have Resilience");
        }

        currentHealth = (int)(maxHealth * skillModifier);
        Debug.Log("Player is starting with current health: " + currentHealth); // this may cause problems when we implement the medpack
    }
Exemplo n.º 2
0
    void Start()
    {
        inGameManager = GetComponent <PlayerControllerLoader>().inGameDataManager;
        pHud          = GetComponent <PlayerHUD>();

        inGameManager.OnEquipmentSwitched += EquipmentSwitched;
    }
Exemplo n.º 3
0
 public void SetStats(Unit u, PlayerHUD hud = null, bool isP = false)
 {
     unit     = u;
     HUD      = hud;
     isPlayer = isP;
     SetHUD();
 }
Exemplo n.º 4
0
        private void DrawPlayersGrid()
        {
            ColumnDefinition column0 = new ColumnDefinition();

            column0.Width = new GridLength(_divisionColumnWidth, GridUnitType.Star);
            PlayersGrid.ColumnDefinitions.Add(column0);

            for (int i = 0; i < _settings.NumberOfPlayers.Value; i++)
            {
                ColumnDefinition playerColumn = new ColumnDefinition();
                playerColumn.Width = new GridLength(_playerColumnWidth, GridUnitType.Star);
                PlayersGrid.ColumnDefinitions.Add(playerColumn);

                ColumnDefinition divisionColumn = new ColumnDefinition();
                divisionColumn.Width = new GridLength(_divisionColumnWidth, GridUnitType.Star);
                PlayersGrid.ColumnDefinitions.Add(divisionColumn);
            }

            int columnIndex = 1;

            foreach (var pair in _players)
            {
                var newHUD = new PlayerHUD(pair.Value, pair.Key, PlayersGrid, columnIndex, this, _idFromButtons);
                _huds.Add(pair.Key, newHUD);
                columnIndex += 2;
            }
        }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        xStart = transform.position.x;
        //xLast = transform.position.x;
        robot = GameObject.Find("Robot").GetComponent <SimpleMovement>();
        ph    = GameObject.Find("Robot").GetComponent <PlayerHUD>();
        rb    = GetComponent <Rigidbody2D> ();
        vec   = new Vector2(1, 0);
        //sr = new SpriteRenderer();
        is_right       = true;
        next_direction = !is_right;
        is_collided    = false;
        this.GetComponent <Rigidbody2D> ().velocity = new Vector2(speed, 0);
        animator = GetComponent <Animator> ();
        RuntimeAnimatorController ac = animator.runtimeAnimatorController;     //Get Animator controller

        for (int i = 0; i < ac.animationClips.Length; i++)                     //For all animations
        {
            if (ac.animationClips[i].name == "ceo_shooting")                   //If it has the same name as your clip
            {
                fireTime = ac.animationClips[i].length;
            }
        }
        Camera cam    = Camera.main;
        float  height = 2f * cam.orthographicSize;

        camera_width = height * cam.aspect;
    }
Exemplo n.º 6
0
    public void TakeDamage(float dmg)
    {
        currentHP = currentHP - dmg;

        if (this.CompareTag("Player"))
        {
            PlayerHUD hud = GetComponentInChildren <PlayerHUD>();
            hud.dmgOverlay.enabled = true;
        }

        if (isDead)
        {
            return;
        }

        if (currentHP <= 0)
        {
            DeathSound();
            isDead = true;
            if (this.CompareTag("Enemy"))
            {
                sprite.enabled = false;
                StartCoroutine(Die());
            }
            else if (this.CompareTag("Player"))
            {
                managerScript.PlayerDeath();
            }
        }
        else
        {
            HurtSound();
        }
    }
Exemplo n.º 7
0
    // Use this for initialization
    void Start()
    {
        isGrounded  = false;
        justLanded  = true;
        gravityOn   = true;
        firstUpdate = false;

        gunOffset = new Vector3(0.0f, 0.75f, 0.50f);        //.02
        xSpeed    = 5;
        xMove     = 0.0f;

        jumpHeight    = STARTINGJUMPHEIGHT;
        jumpIncrease  = MAXJUMPINC;
        jumpFloatTime = MAXJUMPFLOATTIME;
        jumpTime      = MAXJUMPTIME;

        firstUpdateCounter = 0;

        input       = GetComponent <PlayerInput>();
        powers      = GetComponent <PlayerPowers>();
        wallJumping = GetComponent <WallJumping>();
        _HUD        = GetComponent <PlayerHUD>();
        anim        = GetComponent <AnimatorScript>();

        globals     = GameObject.Find("_Globals").GetComponent <GlobalsScript>();
        globalMusic = GameObject.Find("GlobalSoundEffects").GetComponent <GlobalMusicScript>();
        changeMusic = GameObject.Find("GlobalMusicChanger").GetComponent <ChangeVolumeGlitchMusic>();

        rb = GetComponent <Rigidbody>();
        rb.angularVelocity = Vector3.zero;
        rb.freezeRotation  = true;
    }
Exemplo n.º 8
0
 public void UsePotion(float difference)
 {
     // If player health is not equal to max
     if (playerHealth != maxPlayerHealth)
     {
         // If potion is greater than difference of health and max health
         if (playerPotion >= difference)
         {
             playerPotion -= difference;
             playerHealth += difference;
             PlayerHUD.UpdateHealth(playerHealth, maxPlayerHealth);
             PlayerHUD.UpdatePotion(playerPotion, maxPlayerPotion);
         }
         else if (playerPotion < difference && playerPotion > 0)
         {
             playerHealth += playerPotion;
             playerPotion -= playerPotion;
             PlayerHUD.UpdateHealth(playerHealth, maxPlayerHealth);
             PlayerHUD.UpdatePotion(playerPotion, maxPlayerPotion);
         }
         else if (playerPotion == 0)
         {
             Debug.Log("The player is out of potion!");
         }
     }
     else
     {
         Debug.Log("Player is already at max health!");
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// MonoBehaviour
 /// </summary>
 protected override void Awake()
 {
     //m_Wepon = GetComponent<M4A1>();
     m_CharController = GetComponent <CharacterController>();
     m_Animator       = GetComponent <Animator>();
     m_PlayerHUD      = GameObject.Find("PlayerHUD").GetComponent <PlayerHUD>();
 }
Exemplo n.º 10
0
 void Awake()
 {
     gameMode     = FindObjectOfType <GameMode>();
     playerCamera = FindObjectOfType <PlayerCamera>();
     hud          = FindObjectOfType <PlayerHUD>();
     character    = FindObjectOfType <PlayerCharacter>();
 }
    private void Awake()
    {
        _playerHUD       = GetComponent <PlayerHUD>();
        _roundController = FindObjectOfType <RoundController>();

        Init();
    }
Exemplo n.º 12
0
 private void Awake()
 {
     renderAnimator  = playerRenderer.GetComponent <Animator>();
     rb              = GetComponent <Rigidbody2D>();
     playerCollision = GetComponent <PlayerCollision>();
     hud             = GetComponent <PlayerHUD>();
 }
    void Start()
    {
        playerCollider = gameObject.GetComponent <BoxCollider2D>();
        GameObject hud = GameObject.FindGameObjectWithTag("PlayerHUD");

        playerHUD = hud.GetComponent <PlayerHUD>();
    }
Exemplo n.º 14
0
    void Start()
    {
        GameObject hud = GameObject.FindGameObjectWithTag("PlayerHUD");

        playerHUD = hud.GetComponent <PlayerHUD>();
        moveSpeed = walkSpeed;
    }
Exemplo n.º 15
0
 void Awake()
 {
     playerCharacter = FindObjectOfType <PlayerCharacter>();
     playerCamera    = FindObjectOfType <CameraFollow>();
     playerHUD       = FindObjectOfType <PlayerHUD>();
     playerState     = FindObjectOfType <PlayerState>();
 }
Exemplo n.º 16
0
    void Start()
    {
        audioSource = GetComponent <AudioSource>();
        GameObject hud = GameObject.FindGameObjectWithTag("PlayerHUD");

        playerHUD = hud.GetComponent <PlayerHUD>();
    }
    // Use this for initialization
    void Awake()
    {
        playerLives    = 3;
        Time.timeScale = 1;
        restartTimer   = Time.time + 5.5f;
        hud            = GameObject.FindObjectOfType <PlayerHUD>();
        player         = GameObject.FindObjectOfType <PlayerMan>();
        stopWatch      = GameObject.FindObjectOfType <StopWatchManager>();
        timeSubmit     = GameObject.FindObjectOfType <TimeSaveController>();
        if (playerName == null)
        {
            playerName = "tester";
        }
        //Debug.Log("Game Manager Loaded");

        //InputMap
        jump      = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("jumpKey", "Space"));
        attack    = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("attackKey", "F"));
        left      = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("leftKey", "A"));
        right     = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("rightKey", "D"));
        setIce    = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("iceKey", "Alpha3"));
        setFire   = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("fireKey", "Alpha2"));
        setArcane = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("arcaneKey", "Alpha1"));
        pause     = (KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("pauseKey", "Escape"));
    }
Exemplo n.º 18
0
 // Use this for initialization
 void Start()
 {
     robot     = GameObject.Find("Robot");
     ph        = robot.GetComponent <PlayerHUD> ();
     hs        = robot.GetComponent <HealthSystem> ();
     old_color = robot.gameObject.GetComponent <SpriteRenderer> ().color;
 }
Exemplo n.º 19
0
 void Awake()
 {
     if (defaultPawn == null) 		defaultPawn = GetComponent<DefaultGameObject>();
     if (playerHUD == null) 			playerHUD = GetComponent<PlayerHUD>();
     if (playerController == null) 	playerController = GetComponent<PlayerController>();
     if (gameState == null) 			gameState = GetComponent<GameState>();
 }
Exemplo n.º 20
0
 void Awake()
 {
     playerHUD = gameObject.GetComponent<PlayerHUD>();
     thisPlayerInfo = gameObject.GetComponent<BasePlayerInfo>();
     playerFaint = gameObject.GetComponent<PlayerFaint>();
     playerCamera = gameObject.GetComponent<PlayerCamera>();
     UpdateHealthText ();
 }
Exemplo n.º 21
0
 public void RestorePotion()
 {
     if (playerPotion != maxPlayerPotion)
     {
         playerPotion = maxPlayerPotion;
         PlayerHUD.UpdatePotion(playerPotion, maxPlayerPotion);
     }
 }
Exemplo n.º 22
0
 // Use this for initialization
 void Start()
 {
     if (!isLocalPlayer)
     {
         return;
     }
     hudInstance = Instantiate(hudPrefab);
 }
Exemplo n.º 23
0
 public void RestoreHealth()
 {
     if (playerHealth != maxPlayerHealth)
     {
         playerHealth = maxPlayerHealth;
         PlayerHUD.UpdateHealth(playerHealth, maxPlayerHealth);
     }
 }
Exemplo n.º 24
0
 public override void HandleCollision(CollisionDirection collisionDirection, GameObject gameObject)
 {
     if (gameObject is Mario && Mario.GetInstance().IsFinishedState() && !finished)
     {
         finished = true;
         PlayerHUD.GetInstance().AddTimeToPoints();
     }
 }
Exemplo n.º 25
0
 public void _EndGame()
 {
     PlayerPrefs.SetInt("scene", 0);
     PlayerPrefs.SetString("LSText", "Connecting to lobby");
     //SceneManager.UnloadSceneAsync(SceneManager.GetActiveScene().buildIndex);
     WeaponDB.instance = null;
     instance          = null;
     SceneManager.LoadScene(1);
 }
Exemplo n.º 26
0
 private void Awake()
 {
     if (Instance != null)
     {
         Destroy(this);
         return;
     }
     Instance = this;
 }
Exemplo n.º 27
0
    void InitializePlayerHUD()
    {
        InGameSceneMain inGameSceneMain = SystemManager.Instance.GetCurrentSceneMain <InGameSceneMain>();
        GameObject      go          = Resources.Load <GameObject>(PlayerHUDPath);
        GameObject      goInstrance = Instantiate <GameObject>(go, inGameSceneMain.DamageManager.CanvasTransform);
        PlayerHUD       playerHUD   = goInstrance.GetComponent <PlayerHUD>();

        playerHUD.Initialize(this);
    }
Exemplo n.º 28
0
    private void Awake()
    {
        movement = GetComponent <Movement>();
        sentient = GetComponent <Sentient>();

        playerHUD = FindObjectOfType <PlayerHUD>();

        sentient.SetupAsPlayer();
    }
Exemplo n.º 29
0
 private void UpdatePlayerInfo(PlayerHUD playerHUD)
 {
     if (playerHUD == null)
     {
         return;
     }
     playerHUD.healthSlider.value = playerHUD.player.hp;
     playerHUD.armorSlider.value  = playerHUD.player.armor.Value;
 }
Exemplo n.º 30
0
    private void InitializeHUD()
    {
        hud = PlayerHUD.Instance;

        hud.SetName(name);
        hud.SetGold(character.GetInventory().GetItem("Gold").GetQty());
        hud.SetStamina(character.GetStamina().Value);
        hud.SetHealth(character.GetHealth().Value);
    }
Exemplo n.º 31
0
    void InitializePlayerHUD()
    {
        InGameSceneMain inGameSceneMain = SystemManager.Instance.GetCurrentSceneMain <InGameSceneMain>();
        GameObject      go         = Resources.Load <GameObject>(PlayerHUDPath);
        GameObject      goInstance = Instantiate <GameObject>(go, Camera.main.WorldToScreenPoint(transform.position), Quaternion.identity, inGameSceneMain.DamageManager.CanvasTransform);
        PlayerHUD       playerHUD  = goInstance.GetComponent <PlayerHUD>();

        playerHUD.Initialize(this);
    }
Exemplo n.º 32
0
 private void Construct(PlayerCollectibleHandler collectibleController, PlayerMountHandler mountController, InventoryHandler inv,
                        PlayerHUD HUD, ToastMessage message)
 {
     playerCollectibleController = collectibleController;
     playerMountController       = mountController;
     inventory    = inv;
     playerHUD    = HUD;
     toastMessage = message;
 }
Exemplo n.º 33
0
	void Start()
	{
		playerAudio = GetComponent<PlayerAudioController>();
		if (isLocalPlayer)
		{
			playerCam = this.GetComponent<PlayerCamera>();
			HUD = GameObject.Find("HUD man").GetComponent<PlayerHUD>();
			HUD.Spawn(gameObject);
		}
	}
Exemplo n.º 34
0
    public void Awake()
    {
        actor = GetComponent<ActorBehaviour>();
        recorder = GetComponent<RecordBehavior>();
        hud = GetComponent<PlayerHUD>();

        // Record Player Start Position when the Scene Starts
        PlyrStartPos = GetComponent<Transform>().position;

        actor.setSpeed(speed);
        actor.setJumpForce(jumpForce);
    }
        public HUDInventory(PlayerHUD parent)
            : base()
        {
            this.font = GameManager.TheGameManager.Content.Load<SpriteFont>(Path.Fonts + "Moire18");

            this.Area = new Rectangle(
                parent.outerRect.X + 810,
                parent.outerRect.Y + 10,
                400,
                80);

            onClick += new EventHandler(ItemClicked);
            onHover += new EventHandler(ItemHover);
        }
        public HUDStatus(PlayerHUD parent)
            : base()
        {
            ContentManager Content = GameManager.TheGameManager.Content;
            this.Font = Content.Load<SpriteFont>(Path.Fonts + "Moire");
            this.SmallFont = Content.Load<SpriteFont>(Path.Fonts + "MoireSmall");

            this.Area = new Rectangle(
                parent.outerRect.X,
                parent.outerRect.Y,
                200,
                80);

            Status = new Dictionary<StatusType, StatusStruct>();

            StatusStruct HPStruct= new StatusStruct();
            HPStruct.BarTexture = Content.Load<Texture2D>(Path.Textures.Misc + "hpbar");
            HPStruct.BarWidth = 496;
            HPStruct.Bar = new Rectangle(
                Area.X + 243,
                Area.Y + 17,
                (int)HPStruct.BarWidth,
                12);
            HPStruct.Text = "";

            HPStruct.Position = new Vector2(Area.X + 235, Area.Y + 9);

            Status.Add(StatusType.HP, HPStruct);

            StatusStruct RPStruct = new StatusStruct();
            RPStruct.BarTexture = Content.Load<Texture2D>(Path.Textures.Misc + "rpbar");
            RPStruct.BarWidth = 496;
            RPStruct.Bar = new Rectangle(
                Area.X + 243,
                Area.Y + 40,
                (int)RPStruct.BarWidth,
                12);
            RPStruct.Text = "";

            RPStruct.Position = new Vector2(Area.X + 235, Area.Y + 32);

            Status.Add(StatusType.RP, RPStruct);
        }
Exemplo n.º 37
0
    //TODO: DungeonParamaters shouldn't be in HUD
    // Randomize configuration of dungeon and instantiate it
    public static int[,] SpawnDungeon(int _sizeX,int _sizeZ, int _nbrSquareForGeneration, PlayerHUD.DungeonParameters _DungeonParamaters)
    {
        int[,] _dungeonMap; // 2D Array of int that will hold the dungeon map information

        _dungeonMap = CreateDungeonSquares(_sizeX,_sizeZ, _nbrSquareForGeneration); // Fill the array with different squares of various size
        _nbrRoom = FindRooms (_dungeonMap,_sizeX, _sizeZ); // Loop through the dungeon map and find rooms created by touching squares
        if(_nbrRoom > 1)
        {
            _dungeonMap = CreateDungeonHalls(_dungeonMap, _sizeX,_sizeZ,_nbrRoom);  // Add halls between the created room
        }

        SpawnEnvironment(_dungeonMap, _sizeX, _sizeZ, _nbrRoom); // Create environment(Spider eggs for now)

        _ListOfWallsToCreate = EvaluateWallToBuild(_dungeonMap, _sizeX, _sizeZ); // Loop through the dungeon map to find all the wall that need to be created
        InstantiateDungeonWalls(_ListOfWallsToCreate); // Instantiate all the wall found by the EvaluateWallToBuild function

        TestForDungeonClosed(_dungeonMap, _sizeX, _sizeZ, _DungeonParamaters.level); // Make sure its impossible to go from inside the dungeon to outside the dungeon. Make one test per dungeon level(Bigger dungeon have more chance of invisible walls)

        return _dungeonMap;
    }
Exemplo n.º 38
0
 // Use this for initialization
 void Awake()
 {
     hud = GetComponent<PlayerHUD>();
     ctrl = GetComponent<PlayerController>();
 }
Exemplo n.º 39
0
 // Use this for initialization
 void Start()
 {
     _PlayerHUD = GameObject.FindGameObjectWithTag("PlayerMaster").GetComponent<PlayerHUD>();
     _NGUI_HUD  = GameObject.Find("NGUI_Menu").GetComponent<NGUI_HUD>();
 }
Exemplo n.º 40
0
    void Awake()
    {
        Character.IniCharacter();
        Bestiary.IniBestiary();
        Inventory.IniInventory();
        ItemInventory.IniItemInventory();

        _Player       = GameObject.FindGameObjectWithTag("Player");
        _PlayerCam    = GameObject.FindGameObjectWithTag("MainCamera").camera;
        _PlayerMaster = GameObject.FindGameObjectWithTag("PlayerMaster");
        _PlayerHUD    = _PlayerMaster.GetComponent<PlayerHUD>();
        DungeonLevelPool.IniDungeonLevelPool();

           _PrefabManager = GameObject.FindGameObjectWithTag("GameMaster").GetComponent<PrefabManager>();
    }
Exemplo n.º 41
0
 // Start the dungeon by saving game and loading the Dungeon scene
 public void StartDungeon(PlayerHUD.DungeonParameters _DungeonParametersSelected)
 {
     _CurDungeonParameters = _DungeonParametersSelected;
     SaveLoadSystem.Save();
     BuildSystem.CreatedBuildingList = new List<GameObject>(); // Todo: This probably need to go somewhere else
     Application.LoadLevel("Dungeon");
 }
Exemplo n.º 42
0
        void Start()
        {
            playerInfo = gameObject.GetComponent<BasePlayerInfo>();
            playerHealth = gameObject.GetComponent<PlayerHealth>();
            playerCamera = gameObject.GetComponent<PlayerCamera>();

            splashCollider = Resources.Load<GameObject>("Prefabs/Physics/SplashDamageCollider");

            rapidFireCooldown = Settings.RapidFireCooldownSpeed;

            playerCameraTransform = gameObject.GetComponentInChildren<Camera>().transform;
            if(isLocalPlayer) {
                playerGravityBody = gameObject.GetComponent<PlayerGravityBody>();
                playerHUD = gameObject.GetComponent<PlayerHUD> ();
            }

            localPlayerInfoPacket = new PlayerInfoPacket(playerInfo.playerName, playerInfo.playerTeam, netId);
        }
Exemplo n.º 43
0
 void Start()
 {
     _PlayerCam   = GameObject.FindGameObjectWithTag("MainCamera").GetComponentInChildren<Camera>();
     _GameManager = GameObject.FindGameObjectWithTag("GameMaster").GetComponent<GameManager>();
     _PlayerHUD   = GameObject.FindGameObjectWithTag("PlayerMaster").GetComponent<PlayerHUD>();
 }
Exemplo n.º 44
0
    } // Instantiates the chosen miniontype

    public void NewRound()
    {
        if (gameControllerScript.playerType == "alien" && playerEnemyScript == null)
        {
            playerEnemyScript = GameObject.Find("Enemy(Clone)").GetComponent<PlayerEnemy>();
        }

        callNewRound = false;

        gameControllerScript.waveOutcome = GameController.WaveOutcomes.Ongoing;

        if (gameControllerScript.roundNumber < gameControllerScript.lastRound && gameControllerScript.playerType == "pilot")
        {
            playerHUDScript = GameObject.Find("PlayerHUD(Clone)").GetComponent<PlayerHUD>();
            if (!playerHUDScript.readyBool)
            {
                playerHUDScript.Ready(); 
            }

            ChoosePattern();

            ChooseUpgrades();

            ChooseMinion();

            nextRound.Enabled = false;
            spawnTimer.Enabled = true;
            canSpawn = true;

            SpawnMinion();
        }
        else if (gameControllerScript.roundNumber < gameControllerScript.lastRound && gameControllerScript.playerType == "alien")
        {
            enemyHUDScript = GameObject.Find("EnemyHUD(Clone)").GetComponent<EnemyHUD>();
            enemyHUDScript.Ready();
            if (!enemyHUDScript.choseMinion)
            {
                ChooseMinion();
            }
            if (!enemyHUDScript.chosePattern)
            {
                ChoosePattern();
            }

            enemyHUDScript.choseMinion = false;
            enemyHUDScript.chosePattern = false;

            nextRound.Enabled = false;
            spawnTimer.Enabled = true;
            canSpawn = true;

            SpawnMinion();
        }
        else if (gameControllerScript.roundNumber == gameControllerScript.lastRound && gameControllerScript.playerType == "alien")
        {
            enemyHUDScript = GameObject.Find("EnemyHUD(Clone)").GetComponent<EnemyHUD>();
            enemyHUDScript.Ready();
            chosenMinionTag = "boss";
            nextRound.Enabled = false;
            spawnTimer.Enabled = false;
            canSpawn = false;
            countMinions = 10;
            Instantiate(boss, new Vector2(7.50f, 0), Quaternion.Euler(0, 0, 0));
        }
        else if (gameControllerScript.roundNumber == gameControllerScript.lastRound && gameControllerScript.playerType == "pilot")
        {
            playerHUDScript = GameObject.Find("PlayerHUD(Clone)").GetComponent<PlayerHUD>();
            playerHUDScript.Ready();
            chosenMinionTag = "boss";
            nextRound.Enabled = false;
            spawnTimer.Enabled = false;
            canSpawn = false;
            countMinions = 10;
            Instantiate(bossAI, new Vector2(10f, 0), Quaternion.Euler(0, 0, 0));
        }
    } // Starts a new round, choosing patterns, upgrades and minions