private void Update() { if (currentBackground && currentBackground.position.y > screenTop) { Debug.Log("Trocar background!"); //Disable current background BackgroundService.DisableCurrentBackground(currentBackground, backgroundPropsPool, backgroundsPool); //Get next background Enum //currentBackgroundContext = BackgroundService.GetNextContext(currentBackgroundContext, ref 0); currentBackground = BackgroundService.GetBackground(backgroundsPool, currentBackgroundContext); //Set next background as current BackgroundService.SetPropsForBackgroundContext(backgroundPropsPool, ref currentBackground); } }