Esempio n. 1
0
        public ArtVent( ArtVentResource arg_resource, float arg_size, int arg_count ) : base(arg_resource, arg_size, arg_count, new Vector2(0,0) )
        {
            gen_counter = 0.0f;

            //resource = arg_resource;

            gen_freq = arg_resource.generation_frequency;

            velocity_scatter = arg_resource.velocity_scatter * arg_size;
            velocity_ejection = arg_resource.velocity_ejection;

            spawn_temperature_min = arg_resource.temperature - arg_resource.temperature_scatter;
            spawn_temperature_max = arg_resource.temperature + arg_resource.temperature_scatter;

            radius = velocity_ejection * (arg_resource.particle_life * arg_size * GameConst.framerate);
            radius *= 2;

            index_end = 0;
            index_start = 0;
        }
        public static void GenerateAssets()
        {
            ThrusterTemplate template = new ThrusterTemplate();

            template.main_thrust = 1.0f;
            template.reverse_thrust = 0.3f;
            template.side_thrust = 0.3f;
            template.torque = 0.3f;
            template.particle_effects = "default_thruster";
            template.sparkle_effects = "default_sparkles";

            thruster_templates.Add("default", template);


            ArtVentResource vent = new ArtVentResource("particle");
            vent.temperature = 2000;
            vent.size_start = new Vector2(1.0f, 1.0f);
            vent.size_end = new Vector2(4.0f, 1.0f);
            vent.particle_life = 5f;
            vent.temp_halflife = 3f;
            vent.velocity_scatter = 0.1f;
            vent.velocity_ejection = 1f;
            vent.generation_frequency = 0.8f;
            vent.particle_count = 20;
            ArtManager.vents.Add("default_sparkles", vent);

            vent = new ArtVentResource("particle");
            vent.temperature = 2000;
            vent.size_start = new Vector2(1.0f, 1.0f);
            vent.size_end = new Vector2(4.0f, 1.0f);
            vent.particle_life = 0.4f;
            vent.temp_halflife = 0.25f;
            vent.velocity_scatter = 0.15f;
            vent.velocity_ejection = 1f;
            ArtManager.vents.Add("default_thruster", vent);





            template = new ThrusterTemplate();

            template.main_thrust = 1.2f;
            template.reverse_thrust = 0.4f;
            template.side_thrust = 0.4f;
            template.torque = 0.4f;
            template.particle_effects = "better_thruster";
            template.sparkle_effects = "default_sparkles";

            thruster_templates.Add("better", template);


            vent = new ArtVentResource("particle");
            vent.temperature = 5500;
            vent.size_start = new Vector2(1.0f, 1.0f);
            vent.size_end = new Vector2(4.0f, 1.0f);
            vent.particle_life = 0.55f;
            vent.temp_halflife = 0.3f;
            vent.velocity_scatter = 0.2f;
            vent.velocity_ejection = 1f;
            ArtManager.vents.Add("better_thruster", vent);



            template = new ThrusterTemplate();

            template.main_thrust = 0.6f;
            template.reverse_thrust = 0.15f;
            template.side_thrust = 0.15f;
            template.torque = 0.15f;
            template.particle_effects = "worse_thruster";
            template.sparkle_effects = "default_sparkles";

            thruster_templates.Add("worse", template);

            vent = new ArtVentResource("particle");
            vent.temperature = 1500;
            vent.size_start = new Vector2(1.0f, 1.0f);
            vent.size_end = new Vector2(4.0f, 1.0f);
            vent.particle_life = 0.45f;
            vent.temp_halflife = 0.2f;
            vent.velocity_scatter = 0.5f;
            vent.velocity_ejection = 1f;
            ArtManager.vents.Add("worse_thruster", vent);

        }