Advertisement
Pro_Unit

InstanceRegister

Dec 2nd, 2020
906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. namespace Platformer.Core
  2. {
  3.     public static partial class Simulation
  4.     {
  5.         /// <summary>
  6.         /// This class provides a container for creating singletons for any other class,
  7.         /// within the scope of the Simulation. It is typically used to hold the simulation
  8.         /// models and configuration classes.
  9.         /// </summary>
  10.         /// <typeparam name="T"></typeparam>
  11.         static class InstanceRegister<T> where T : class, new()
  12.         {
  13.             public static T instance = new T();
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement