Newer
Older
TheVengeance-Project-IADE-Unity2D / Assets / Scripts / Managers / LoadingProgress.cs
@Rackday Rackday on 29 Oct 359 bytes Major Update
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. namespace MyCollections.SceneManagement
  6. {
  7. public class LoadingProgress : IProgress<float>
  8. {
  9. public event Action<float> OnProgress;
  10. const float ratio = 1f;
  11. public void Report(float value) => OnProgress?.Invoke(value / ratio);
  12. }
  13. }