예제 #1
0
        public void Precalc(LevelBlueprint lvl)
        {
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_SIMULATION_RESOLUTION, ref RESOLUTION);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_SIMULATION_SCATTERTRUST, ref TRUSTANGLE);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_SIMULATION_UPS, ref SIMULATION_UPS);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_SIMULATION_LIFETIME_FAC, ref LIFETIME_FAC);

            foreach (var cannon in lvl.BlueprintCannons)
            {
                cannon.PrecalculatedPaths = Precalc(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintRelayCannon)
            {
                cannon.PrecalculatedPaths = Precalc(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintMinigun)
            {
                cannon.PrecalculatedPaths = Precalc(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintTrishotCannon)
            {
                cannon.PrecalculatedPaths = Precalc(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintLaserCannons)
            {
                cannon.PrecalculatedPaths = new LevelKITracer().PrecalcLaser(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintShieldProjector)
            {
                cannon.PrecalculatedPaths = new LevelKITracer().PrecalcLaser(lvl, cannon);
            }
        }
예제 #2
0
        public void PrecalcLaser(LevelBlueprint lvl)
        {
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_TRACE_HITBOX_ENLARGE, ref HITBOX_ENLARGE);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_TRACE_MAX_BULLETBOUNCE, ref MAX_COUNT_RECAST);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_TRACE_MAX_LASERREFLECT, ref MAX_COUNT_REFLECT);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_TRACE_RESOULUTION, ref RESOLUTION);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_TRACE_MAX_LASERREFLECT, ref MAX_COUNT_REFLECT);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_TRACE_NO_LASER_CORNER_REFLECT, ref NO_LASER_CORNER_HITS);
            lvl.GetConfig(LevelBlueprint.KI_CONFIG_TRACE_REFRAC_CORNER_ENLARGE_FAC, ref REFRAC_CORNER_ENLARGE_FAC);

            foreach (var cannon in lvl.BlueprintCannons)
            {
                cannon.PrecalculatedPaths = PrecalcBullet(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintMinigun)
            {
                cannon.PrecalculatedPaths = PrecalcBullet(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintRelayCannon)
            {
                cannon.PrecalculatedPaths = PrecalcBullet(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintTrishotCannon)
            {
                cannon.PrecalculatedPaths = PrecalcBullet(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintLaserCannons)
            {
                cannon.PrecalculatedPaths = PrecalcLaser(lvl, cannon);
            }

            foreach (var cannon in lvl.BlueprintShieldProjector)
            {
                cannon.PrecalculatedPaths = PrecalcLaser(lvl, cannon);
            }
        }