public void Init(EndScreenUI parent, PowerUp powerUp) { m_parent = parent; bool hasNextLevel = powerUp.Config.NextLevel != null; if (hasNextLevel) { m_image.sprite = powerUp.Config.NextLevel.Icon; m_price.text = powerUp.Config.NextLevel.Price.ToString(); } m_button.interactable = hasNextLevel; m_powerUp = powerUp; }
void Awake() { instance = this; }