示例#1
0
    private void Awake()
    {
        _saveController = FindObjectOfType(typeof(Save_Controller)) as Save_Controller;
        _gameController = FindObjectOfType(typeof(GameController)) as GameController;
        _painelSave     = FindObjectOfType(typeof(PainelSave)) as PainelSave;

        _saveController.ChamarBuscarSaves(_gameController.id_usuario, CarregarPainelSaves);
    }
示例#2
0
    public void LimparPaineis(bool flag)
    {
        //limpa os paineis ja existentes
        if (flag)
        {
            paineis = new GameObject[0];

            PainelSave[] pSaves = FindObjectsOfType <PainelSave>();

            for (int i = 0; i < pSaves.Length; i++)
            {
                Destroy(pSaves[i].gameObject);
            }

            _saveController.ChamarBuscarSaves(_gameController.id_usuario, CarregarPainelSaves);
        }
    }