public override void OnDisable()
 {
     saveFileName = "";
     if (pool != null)
     {
         pool.ReturnObject(gameObject);
     }
     base.OnDisable();
 }
    public void DeInit()
    {
        for (int i = buildingListings.Count - 1; i >= 0; i--)
        {
            BuildingListing building = buildingListings[i];
            building.DeInit();
            buildingsPool.ReturnObject(building.gameObject);
        }

        buildingListings.Clear();
    }
Exemple #3
0
    public void DeInit()
    {
        for (int i = playerListings.Count - 1; i >= 0; i--)
        {
            IngamePlayerListing player = playerListings[i];
            player.DeInit();
            basePool.ReturnObject(player.gameObject);
        }

        playerListings.Clear();
    }
Exemple #4
0
    public override void Deinit()
    {
        message.text = "QuestionBox";

        //Zwracanie użytych przycisków do puli
        for (int i = showedButtons.Count - 1; i >= 0; i--)
        {
            GameObject button = showedButtons[i];
            button.GetComponent <Button>().onClick.RemoveAllListeners();
            button.GetComponentInChildren <TextMeshProUGUI>().text = "";
            buttonPool.ReturnObject(button);
        }

        showedButtons.Clear();

        base.Deinit();
    }
 public void Deinit()
 {
     playPanel.roomListings.Remove(this);
     roomInfo = null;
     pool.ReturnObject(gameObject);
 }
 public void Deinit()
 {
     player = null;
     pool.ReturnObject(gameObject);
     UnsubscribeEvents();
 }
 public void DeInit()
 {
     tradeField = null;
     nameText.text = "";
     listingsPool.ReturnObject(gameObject);
 }