示例#1
0
        public static GlobalLightLevel Instantiate(int level)
        {
            byte             num1   = ((byte)level);
            GlobalLightLevel level1 = GlobalLightLevel.m_Cache[num1];

            if (level1 == null)
            {
                GlobalLightLevel.m_Cache[num1] = (level1 = new GlobalLightLevel(level));
            }
            return(level1);
        }
示例#2
0
        public static GlobalLightLevel Instantiate( int level )
        {
            byte lvl = (byte)level;
            GlobalLightLevel p = m_Cache[lvl];

            if ( p == null )
                m_Cache[lvl] = p = new GlobalLightLevel( level );

            return p;
        }
示例#3
0
		public static GlobalLightLevel Instantiate(int level)
		{
			var lvl = (byte)level;
			GlobalLightLevel p = m_Cache[lvl];

			if (p == null)
			{
				m_Cache[lvl] = p = new GlobalLightLevel(level);
				p.SetStatic();
			}

			return p;
		}