Esempio n. 1
0
        // Deletes all graphics from world
        public void Delete()
        {
            if (m_Altar != null)
            {
                m_Altar.Delete();
                m_Altar = null;
            }

            if (m_Platform != null)
            {
                m_Platform.Delete();
                m_Platform = null;
            }

            foreach (Item i in m_RedSkulls)
            {
                i.Delete();
            }
            m_RedSkulls.Clear();

            foreach (Item i in m_WhiteSkulls)
            {
                i.Delete();
            }
            m_WhiteSkulls.Clear();
        }
Esempio n. 2
0
        private int m_AltarHue;                         // allows different base hues

        // ctor
        public ChampGraphics(ChampEngine champ)
        {
            // Create new objects
            m_Champ            = champ;
            m_Platform         = new ChampPlatform(false, m_Champ);
            m_Altar            = new ChampAltar(false, m_Champ);
            m_RedSkulls        = new ArrayList();
            m_WhiteSkulls      = new ArrayList();
            m_Platform.Visible = true;
            m_Altar.Visible    = true;
            m_AltarHue         = 0;
            // move to location of champ spawn
            UpdateLocation();
        }
Esempio n. 3
0
		private int m_AltarHue;						// allows different base hues

		// ctor 
		public ChampGraphics( ChampEngine champ )
		{
			// Create new objects
			m_Champ = champ;
			m_Platform = new ChampPlatform(false, m_Champ );
			m_Altar = new ChampAltar(false, m_Champ );
			m_RedSkulls = new ArrayList();
			m_WhiteSkulls = new ArrayList();
			m_Platform.Visible = true;
			m_Altar.Visible = true;			
			m_AltarHue = 0;
			// move to location of champ spawn
			UpdateLocation();
        }
Esempio n. 4
0
        // Cosntructor called from ChampEngie.Deserialize() to recreate gfx
        public ChampGraphics(ChampEngine champ, GenericReader reader)
        {
            int ver = reader.ReadInt();

            switch (ver)
            {
            case 0:
            {
                //Alows re-creation of serialised graphics
                m_Champ       = champ;
                m_Platform    = reader.ReadItem() as ChampPlatform;
                m_Altar       = reader.ReadItem() as ChampAltar;
                m_RedSkulls   = reader.ReadItemList();
                m_WhiteSkulls = reader.ReadItemList();
                m_AltarHue    = reader.ReadInt();
                //rehue
                m_Altar.Hue = m_AltarHue;
                break;
            }
            }
        }
Esempio n. 5
0
        // Cosntructor called from ChampEngie.Deserialize() to recreate gfx
		public ChampGraphics( ChampEngine champ, GenericReader reader )
		{	
			int ver = reader.ReadInt();

			switch( ver )
			{
				case 0 :
				{
					//Alows re-creation of serialised graphics		
					m_Champ = champ;
					m_Platform = reader.ReadItem() as ChampPlatform;			
					m_Altar = reader.ReadItem() as ChampAltar;			
					m_RedSkulls = reader.ReadItemList();
					m_WhiteSkulls = reader.ReadItemList();				
					m_AltarHue = reader.ReadInt();
					//rehue
					m_Altar.Hue = m_AltarHue;
					break;
				}
			}
		}
Esempio n. 6
0
		// Deletes all graphics from world
		public void Delete()
		{
			if( m_Altar != null )
			{
				m_Altar.Delete();
				m_Altar = null;
			}
			
			if( m_Platform != null )
			{
				m_Platform.Delete();
				m_Platform = null;
			}

			foreach( Item i in m_RedSkulls )
				i.Delete();			
			m_RedSkulls.Clear();

			foreach( Item i in m_WhiteSkulls )
				i.Delete();			
			m_WhiteSkulls.Clear();
        }