AxiosEngine-old 

AxiosEngine-old Mercurial Source Tree


Root/axios/Engine/Singleton.cs

using System;
 
namespace Axios.Engine
{
    public abstract class Singleton<T> where T: new()
    {
        private static T instance;
        private static object syncRoot = new Object();
         
        public static T Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (syncRoot)
                    {
                        if (instance == null)
                            instance = new T();
                    }
                }
 
                return instance;
            }
        }
    }
}
Source at commit 0737379cc88f created 12 years 3 months ago.
By Nathan Adams, Adding visible property to SimpleDrawableAxiosGameObject

Archive Download this file

Page rendered in 0.91145s using 11 queries.