public static void GenerateAssets()
        {
            ShieldTemplate template = new ShieldTemplate();

            template.art_resource = "default";
            template.integrity = 120;

            shield_templates["default"] = template;
            
            
            ArtShieldResource art = new ArtShieldResource("particle");
            art.particle_color_start = Color.White;
            art.particle_color_end = Color.Blue;
            art.particle_count = 16;
            art.shield_particle_size_max = 1.2f;
            art.shield_particle_size_min = 0.5f;
            art.shield_particle_speed = 0.06f;
            art.shield_particle_halflife = 1.0f;
            art.reform_particle_rate = 70;

            art.particle_velocity = 0.5f;
            art.particle_life = 6f;
            //art.size_end = new Vector2(0.5f, 0.5f);

            ArtManager.shields["default"] = art;






            template = new ShieldTemplate();

            template.art_resource = "green";
            template.integrity = 100f;

            shield_templates["green"] = template;


            art = new ArtShieldResource("particle");
            art.particle_color_start = Color.White;
            art.particle_color_end = Color.LimeGreen;
            art.particle_count = 22;
            art.shield_particle_size_max = 0.8f;
            art.shield_particle_size_min = 0.3f;
            art.shield_particle_speed = 0.1f;
            art.shield_particle_halflife = 0.8f;
            art.reform_particle_rate = 60f;

            art.particle_velocity = 0.7f;
            art.particle_life = 3f;
            //art.size_end = new Vector2(0.5f, 0.5f);

            ArtManager.shields["green"] = art;


        }
示例#2
0
        public ComponentShield( Ship arg_ship, float arg_size, ShieldTemplate arg_template): base(arg_ship, arg_ship.template.component_shield_pos, arg_size, arg_template)
        {
            template = arg_template;

            radius = arg_ship.template.shield_radius;

            hitbox = new HitboxCircle(radius);
            art = ArtManager.shields[template.art_resource].New(radius, size);

            shield_resistance = template.shield_resistance * SHIELD_BASE_RESISTANCE;

            max_integrity = (arg_template.integrity * arg_size * Utility.Sqrt(arg_size));
            regen_rate = (arg_template.regen / GameConst.framerate) * arg_size;
            integrity = max_integrity;
            reform_integrity = max_integrity * template.reform_integrity;
            active = true;
        }