예제 #1
0
        public void WriteTo(Stream stream)
        {
            BinaryWriter writer = new BinaryWriter(stream);

            m_GameObject.WriteTo(stream);
            writer.Write(lengthInSec);
            writer.Write(startDelay);
            writer.Write(speed);
            writer.Write(randomSeed);
            writer.Write(looping);
            writer.Write(prewarm);
            writer.Write(playOnAwake);
            writer.Write(moveWithTransform);
            InitialModule.WriteTo(stream);
            ShapeModule.WriteTo(stream);
            EmissionModule.WriteTo(stream);
            SizeModule.WriteTo(stream);
            RotationModule.WriteTo(stream);
            ColorModule.WriteTo(stream);
            UVModule.WriteTo(stream);
            VelocityModule.WriteTo(stream);
            ForceModule.WriteTo(stream);
            ExternalForcesModule.WriteTo(stream);
            ClampVelocityModule.WriteTo(stream);
            SizeBySpeedModule.WriteTo(stream);
            RotationBySpeedModule.WriteTo(stream);
            ColorBySpeedModule.WriteTo(stream);
            CollisionModule.WriteTo(stream);
            SubModule.WriteTo(stream);
        }
예제 #2
0
        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            m_GameObject          = new PPtr <GameObject>(stream, file);
            lengthInSec           = reader.ReadSingle();
            startDelay            = reader.ReadSingle();
            speed                 = reader.ReadSingle();
            randomSeed            = reader.ReadUInt32();
            looping               = reader.ReadBoolean();
            prewarm               = reader.ReadBoolean();
            playOnAwake           = reader.ReadBoolean();
            moveWithTransform     = reader.ReadBoolean();
            InitialModule         = new InitialModule(stream);
            ShapeModule           = new ShapeModule(file, stream);
            EmissionModule        = new EmissionModule(stream);
            SizeModule            = new SizeModule(stream);
            RotationModule        = new RotationModule(stream);
            ColorModule           = new ColorModule(stream);
            UVModule              = new UVModule(stream);
            VelocityModule        = new VelocityModule(stream);
            ForceModule           = new ForceModule(stream);
            ExternalForcesModule  = new ExternalForcesModule(stream);
            ClampVelocityModule   = new ClampVelocityModule(stream);
            SizeBySpeedModule     = new SizeBySpeedModule(stream);
            RotationBySpeedModule = new RotationBySpeedModule(stream);
            ColorBySpeedModule    = new ColorBySpeedModule(stream);
            CollisionModule       = new CollisionModule(file, stream);
            SubModule             = new SubModule(file, stream);
        }
예제 #3
0
 public void LoadFrom(Stream stream)
 {
     BinaryReader reader = new BinaryReader(stream);
     m_GameObject = new PPtr<GameObject>(stream, file);
     lengthInSec = reader.ReadSingle();
     startDelay = reader.ReadSingle();
     speed = reader.ReadSingle();
     randomSeed = reader.ReadUInt32();
     looping = reader.ReadBoolean();
     prewarm = reader.ReadBoolean();
     playOnAwake = reader.ReadBoolean();
     moveWithTransform = reader.ReadBoolean();
     InitialModule = new InitialModule(stream);
     ShapeModule = new ShapeModule(file, stream);
     EmissionModule = new EmissionModule(stream);
     SizeModule = new SizeModule(stream);
     RotationModule = new RotationModule(stream);
     ColorModule = new ColorModule(stream);
     UVModule = new UVModule(stream);
     VelocityModule = new VelocityModule(stream);
     ForceModule = new ForceModule(stream);
     ExternalForcesModule = new ExternalForcesModule(stream);
     ClampVelocityModule = new ClampVelocityModule(stream);
     SizeBySpeedModule = new SizeBySpeedModule(stream);
     RotationBySpeedModule = new RotationBySpeedModule(stream);
     ColorBySpeedModule = new ColorBySpeedModule(stream);
     CollisionModule = new CollisionModule(file, stream);
     SubModule = new SubModule(file, stream);
 }