Esempio n. 1
0
        public void ChangeDest(SHTeleComponent dest)
        {
            if (m_Changing)
            {
                return;
            }

            m_Changing = true;

            if (dest == null || !(dest.Addon is SHTeleporter))
            {
                UpTele.TeleDest    = dest;
                RightTele.TeleDest = dest;
                DownTele.TeleDest  = dest;
                LeftTele.TeleDest  = dest;
            }
            else
            {
                SHTeleporter destAddon = (SHTeleporter)dest.Addon;

                UpTele.TeleDest    = destAddon.UpTele;
                RightTele.TeleDest = destAddon.RightTele;
                DownTele.TeleDest  = destAddon.DownTele;
                LeftTele.TeleDest  = destAddon.LeftTele;
            }

            m_Changing = false;
        }
Esempio n. 2
0
        public void ChangeDest(SHTeleComponent dest)
        {
            if (this.m_Changing)
            {
                return;
            }

            this.m_Changing = true;

            if (dest == null || !(dest.Addon is SHTeleporter))
            {
                this.m_UpTele.TeleDest    = dest;
                this.m_RightTele.TeleDest = dest;
                this.m_DownTele.TeleDest  = dest;
                this.m_LeftTele.TeleDest  = dest;
            }
            else
            {
                SHTeleporter destAddon = (SHTeleporter)dest.Addon;

                this.m_UpTele.TeleDest    = destAddon.UpTele;
                this.m_RightTele.TeleDest = destAddon.RightTele;
                this.m_DownTele.TeleDest  = destAddon.DownTele;
                this.m_LeftTele.TeleDest  = destAddon.LeftTele;
            }

            this.m_Changing = false;
        }
Esempio n. 3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            _ = reader.ReadInt();

            m_Active     = reader.ReadBool();
            m_TeleDest   = reader.ReadItem() as SHTeleComponent;
            m_TeleOffset = reader.ReadPoint3D();
        }
Esempio n. 4
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_Active     = reader.ReadBool();
            m_TeleDest   = reader.ReadEntity <SHTeleComponent>();
            m_TeleOffset = reader.ReadPoint3D();
        }
Esempio n. 5
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            _ = reader.ReadInt();

            External = reader.ReadBool();

            UpTele    = (SHTeleComponent)reader.ReadItem();
            RightTele = (SHTeleComponent)reader.ReadItem();
            DownTele  = (SHTeleComponent)reader.ReadItem();
            LeftTele  = (SHTeleComponent)reader.ReadItem();
        }
Esempio n. 6
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            this.m_External = reader.ReadBool();

            this.m_UpTele    = (SHTeleComponent)reader.ReadItem();
            this.m_RightTele = (SHTeleComponent)reader.ReadItem();
            this.m_DownTele  = (SHTeleComponent)reader.ReadItem();
            this.m_LeftTele  = (SHTeleComponent)reader.ReadItem();
        }
Esempio n. 7
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_External = reader.ReadBool();

            m_UpTele    = reader.ReadEntity <SHTeleComponent>();
            m_RightTele = reader.ReadEntity <SHTeleComponent>();
            m_DownTele  = reader.ReadEntity <SHTeleComponent>();
            m_LeftTele  = reader.ReadEntity <SHTeleComponent>();
        }
Esempio n. 8
0
        public SHTeleporter(bool external)
        {
            this.m_Changing = false;
            this.m_External = external;

            if (external)
            {
                this.AddComponent(new AddonComponent(0x549), -1, -1, 0);
                this.AddComponent(new AddonComponent(0x54D), 0, -1, 0);
                this.AddComponent(new AddonComponent(0x54E), 1, -1, 0);
                this.AddComponent(new AddonComponent(0x548), 2, -1, 0);
                this.AddComponent(new AddonComponent(0x54B), -1, 0, 0);
                this.AddComponent(new AddonComponent(0x53B), 0, 0, 0);
                this.AddComponent(new AddonComponent(0x53B), 1, 0, 0);
                this.AddComponent(new AddonComponent(0x544), 2, 0, 0);
                this.AddComponent(new AddonComponent(0x54C), -1, 1, 0);
                this.AddComponent(new AddonComponent(0x53B), 0, 1, 0);
                this.AddComponent(new AddonComponent(0x53B), 1, 1, 0);
                this.AddComponent(new AddonComponent(0x545), 2, 1, 0);
                this.AddComponent(new AddonComponent(0x547), -1, 2, 0);
                this.AddComponent(new AddonComponent(0x541), 0, 2, 0);
                this.AddComponent(new AddonComponent(0x543), 1, 2, 0);
                this.AddComponent(new AddonComponent(0x540), 2, 2, 0);
            }

            Point3D upOS = external ? new Point3D(-1, 0, 0) : new Point3D(-2, -1, 0);

            this.m_UpTele = new SHTeleComponent(external ? 0x1775 : 0x495, upOS);
            this.AddComponent(this.m_UpTele, 0, 0, 0);

            Point3D rightOS = external ? new Point3D(-2, 0, 0) : new Point3D(2, -1, 0);

            this.m_RightTele = new SHTeleComponent(external ? 0x1775 : 0x495, rightOS);
            this.AddComponent(this.m_RightTele, 1, 0, 0);

            Point3D downOS = external ? new Point3D(-2, -1, 0) : new Point3D(2, 2, 0);

            this.m_DownTele = new SHTeleComponent(external ? 0x1776 : 0x495, downOS);
            this.AddComponent(this.m_DownTele, 1, 1, 0);

            Point3D leftOS = external ? new Point3D(-1, -1, 0) : new Point3D(-1, 2, 0);

            this.m_LeftTele = new SHTeleComponent(external ? 0x1775 : 0x495, leftOS);
            this.AddComponent(this.m_LeftTele, 0, 1, 0);
        }
Esempio n. 9
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			m_External = reader.ReadBool();

			m_UpTele = (SHTeleComponent)reader.ReadItem();
			m_RightTele = (SHTeleComponent)reader.ReadItem();
			m_DownTele = (SHTeleComponent)reader.ReadItem();
			m_LeftTele = (SHTeleComponent)reader.ReadItem();
		}
Esempio n. 10
0
		public void ChangeDest( SHTeleComponent dest )
		{
			if ( m_Changing )
				return;

			m_Changing = true;

			if ( dest == null || !(dest.Addon is SHTeleporter) )
			{
				m_UpTele.TeleDest = dest;
				m_RightTele.TeleDest = dest;
				m_DownTele.TeleDest = dest;
				m_LeftTele.TeleDest = dest;
			}
			else
			{
				SHTeleporter destAddon = (SHTeleporter)dest.Addon;

				m_UpTele.TeleDest = destAddon.UpTele;
				m_RightTele.TeleDest = destAddon.RightTele;
				m_DownTele.TeleDest = destAddon.DownTele;
				m_LeftTele.TeleDest = destAddon.LeftTele;
			}

			m_Changing = false;
		}
Esempio n. 11
0
		public SHTeleporter( bool external )
		{
			m_Changing = false;
			m_External = external;

			if ( external )
			{
				AddComponent( new AddonComponent( 0x549 ), -1, -1, 0 );
				AddComponent( new AddonComponent( 0x54D ), 0, -1, 0 );
				AddComponent( new AddonComponent( 0x54E ), 1, -1, 0 );
				AddComponent( new AddonComponent( 0x548 ), 2, -1, 0 );
				AddComponent( new AddonComponent( 0x54B ), -1, 0, 0 );
				AddComponent( new AddonComponent( 0x53B ), 0, 0, 0 );
				AddComponent( new AddonComponent( 0x53B ), 1, 0, 0 );
				AddComponent( new AddonComponent( 0x544 ), 2, 0, 0 );
				AddComponent( new AddonComponent( 0x54C ), -1, 1, 0 );
				AddComponent( new AddonComponent( 0x53B ), 0, 1, 0 );
				AddComponent( new AddonComponent( 0x53B ), 1, 1, 0 );
				AddComponent( new AddonComponent( 0x545 ), 2, 1, 0 );
				AddComponent( new AddonComponent( 0x547 ), -1, 2, 0 );
				AddComponent( new AddonComponent( 0x541 ), 0, 2, 0 );
				AddComponent( new AddonComponent( 0x543 ), 1, 2, 0 );
				AddComponent( new AddonComponent( 0x540 ), 2, 2, 0 );
			}

			Point3D upOS = external ? new Point3D( -1, 0, 0 ) : new Point3D( -2, -1, 0 );
			m_UpTele = new SHTeleComponent( external ? 0x1775 : 0x495, upOS );
			AddComponent( m_UpTele, 0, 0, 0 );

			Point3D rightOS = external ? new Point3D( -2, 0, 0 ) : new Point3D( 2, -1, 0 );
			m_RightTele = new SHTeleComponent( external ? 0x1775 : 0x495, rightOS );
			AddComponent( m_RightTele, 1, 0, 0 );

			Point3D downOS = external ? new Point3D( -2, -1, 0 ) : new Point3D( 2, 2, 0 );
			m_DownTele = new SHTeleComponent( external ? 0x1776 : 0x495, downOS );
			AddComponent( m_DownTele, 1, 1, 0 );

			Point3D leftOS = external ? new Point3D( -1, -1, 0 ) : new Point3D( -1, 2, 0 );
			m_LeftTele = new SHTeleComponent( external ? 0x1775 : 0x495, leftOS );
			AddComponent( m_LeftTele, 0, 1, 0 );
		}
Esempio n. 12
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			m_Active = reader.ReadBool();
			m_TeleDest = reader.ReadItem() as SHTeleComponent;
			m_TeleOffset = reader.ReadPoint3D();
		}