protected void Awake() { if (_instance != null) { throw new Exception("Tentative de création d'une autre instance de BudgetPanelManager alors que c'est un singleton."); } _instance = this; TweenerLead.Instance.NewTween(GetComponent <RectTransform>(), tweener); Events.Instance.AddListener <OnPopupBuilding>(Open); gameObject.SetActive(false); }
protected void OnDestroy() { Events.Instance.RemoveListener <OnPopupBuilding>(Open); _instance = null; }