Exemplo n.º 1
0
        public ArtVent New( float scale )
        {
            int count;
            if (particle_count != -1)
            {
                count = particle_count;
            }
            else
            {
                // Yea, so i estimate the count based on the theoretical maximum count
                count = (int)(scale * particle_life * GameConst.framerate * generation_frequency) + 1;
            }


            // TODO: fill out properties
            ArtVent vent = new ArtVent(this, scale, count );

            return vent;
        }
Exemplo n.º 2
0
        public ComponentThruster(Ship ship, float arg_size, ThrusterTemplate arg_template) : base(ship, ship.template.component_thruster_pos, arg_size, arg_template)
        {

            template = arg_template;
            side_thrust = template.side_thrust * size;
            reverse_thrust = template.reverse_thrust * size;
            main_thrust = template.main_thrust * size;
            torque = template.torque * ship.template.mass_avg_radius * size; //template.torque * size;

            facade = new ThrusterFacade(this);

            // this needs to be dynamic
            sparkles = ArtManager.GetVentResource(template.sparkle_effects).New(0.5f);


            // I was copying particle_ports from the template, when there is no need to. Just take a pointer.
            //particle_ports = new List<ThrusterPort>();
            particle_ports = ship.template.thruster_ports;
            particle_vents = new List<ArtVent>();

            
            foreach (ThrusterPort port in ship.template.thruster_ports)
            {
                //particle_ports.Add( port.Copy() );
                ArtVent vent = ArtManager.GetVentResource(template.particle_effects).New(port.size);
                particle_vents.Add(vent);
            }
            
        }