// Updates every frame but for UI
 private void OnGUI()
 {
     actualSpaceshipsText.text = spaceshipManager.GetMySpaceships().Count.ToString() + "/" + buySpaceships.maxSpaceships;
     actualMiningText.text     = spaceshipManager.GetMyMiningSpaceships().Count.ToString();
     actualAttackText.text     = spaceshipManager.GetMyAttackSpaceships().Count.ToString();
     actualDefenceText.text    = spaceshipManager.GetMyDefenceSpaceships().Count.ToString();
 }
    private void UpdateListOfSpaceships()
    {
        var spaceshipsGo = _spaceshipManager.GetMySpaceships();

        _spaceships.Clear();
        foreach (var obj in spaceshipsGo)
        {
            _spaceships.Add(obj.GetComponent <Spaceship>());
        }
    }