Pro_Unit

LoadingScreen

Sep 15th, 2021
547
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class LoadingScreen : MonoBehaviour
  2.     {
  3.         [SerializeField] private Text _description;
  4.         [SerializeField] private Image _background;
  5.         public void ShowLocationInfo(Location location)
  6.         {
  7.             _description.text = location.Description;
  8.             _background.sprite = location.LoadingBackground;
  9.         }
  10.        
  11.         public void Load(Location location)
  12.         {
  13.             SceneManager.LoadScene(location.SceneIndex);
  14.         }
  15.     }
RAW Paste Data