<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>&lt;undefined&gt;</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>0</depth>
  <persistent>0</persistent>
  <parentName>&lt;undefined&gt;</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>// Create a surface the size of the current room
// You could also create a surface the size of the current view, but I won't get into that
surf = surface_create(room_width, room_height);

// The following two lines clear the surface
// There is no guarantee that the surface doesn't contain garbage info post-creation
surface_set_target(surf);
draw_clear_alpha(c_black, 0);

// Reset to application surface
surface_reset_target();


// booleano iluminar
iluminar = false;
tiempoIluminado = 0;

depth = -1;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="0">
      <action>
        <libid>1</libid>
        <id>224</id>
        <kind>0</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>0</useapplyto>
        <exetype>1</exetype>
        <functionname>action_another_room</functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>11</kind>
            <room>menu</room>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>///SURFACEEEEE

//Restartear room
//if(keyboard_check(ord("R"))) room_restart();

// Surfaces are volatile 
// Always check that they haven't been destroyed 
if (surface_exists(surf)) {
    surface_set_target(surf);

    // The following three lines set the 'dark' overlay
    draw_set_color(c_black);
    draw_set_alpha(1);
    draw_rectangle(0, 0, room_width, room_height, 0);

    // Setting the blend mode to 'subtract' is what allows us to "cut holes" out of the overlay
    draw_set_blend_mode(bm_subtract);
    draw_set_color(c_white);
    
    // Draw circles in the overlay with your different light sources
    // Note that I add randomization to the position and radius to mimic a flicker effect
    
    tiempoIluminado++;
    
    for(i=0; i&lt; instance_number(objLightSource); i++)
    {
        with (instance_find(objLightSource, i))
        {
            draw_circle(x + random_range(-1, 1), y + random_range(-1, 1), radius + random_range(-1, 1), false);
            //LA DOOOOOONA
            /*{
            draw_set_blend_mode(bm_add);
            draw_set_color(c_black);
            draw_circle(x + random_range(-1, 1), y + random_range(-1, 1), (max(radius - max(min(maxRadius/3,50), 20), 0)) + random_range(-1, 1), false);
            draw_set_blend_mode(bm_subtract);
            draw_set_color(c_white);
            }*/
            
        }
    }
    for(i=0; i&lt;instance_number(objPlayer); i++)
    {
        with(instance_find(objPlayer, i))
        {
            draw_sprite(sprRed,0,x,y);
            draw_self();
            //draw_circle(x + random_range(-1, 1), y + random_range(-1, 1), 16 + random_range(-1, 1), false);
        }
    }
for(i=0; i&lt;instance_number(objEnemy); i++)
    {
        with(instance_find(objEnemy, i))
        {
            if (!llego)
            {
                draw_sprite(sprRed,0,x,y);
                draw_self();
            }
            //draw_circle(x + random_range(-1, 1), y + random_range(-1, 1), 16 + random_range(-1, 1), false);
        }
    }

    /*
    for(i=0; i&lt;instance_number(objEnemy); i++)
    {
        with (instance_find(objEnemy, i))
        {
            if(!llego)
            draw_circle(x + random_range(-1, 1), y + random_range(-1, 1), 16 + random_range(-1, 1), false);
        }
    }
    */
    /*
    if(instance_exists(objMarker))
    {
        with(instance_find(objMarker,0))
        {
            //draw_set_alpha(0.7);
            draw_sprite(sprRed,0,x,y);
            //draw_circle(x + random_range(-1, 1), y + random_range(-1, 1), 16 , false);
        }
    }
    */
    /*
    with (objLightSource)
        if (image_xscale &gt; 0.25)
            draw_circle(x + random_range(-1, 1), y + random_range(-1, 1), 40 + random_range(-1, 1), false);
    */
    
    // Reset all of your draw stuff
    draw_set_blend_mode(bm_normal);
    draw_set_alpha(1);
    surface_reset_target();
} else {
    // Again, surfaces can be a pain
    // Create a new one if there were issues
    surf = surface_create(room_width, room_height);
    surface_set_target(surf);
    draw_clear_alpha(c_black, 0);
    surface_reset_target();
}

// Apparently I moved my fog layer with 'objDarkRoom', haha
background_x[1] -= 0.5;

if(tiempoIluminado &gt;= 15)
{
    tiempoIluminado = 0
    iluminar = false;
}

if(!instance_exists(objMeta) &amp;&amp; alarm[0] != -1)
{
    alarm[0] = 300;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="5">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>// Clean up the surface memory manually
if (surface_exists(surf)) 
    surface_free(surf);
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" enumb="73">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>// Draw the surface or create a new one
// Be sure to use views, even if it isn't necessary for your game
// This trick bypasses an issue with resizing the game window
// DX requires that surfaces be destroyed when resizing
if (!surface_exists(surf)) {
    surf = surface_create(room_width, room_height);
} else {
    if (view_current == 0) {
        draw_surface(surf, 0, 0);
    }
}

if(instance_exists(objSoundPunch))
    {
        with(instance_find(objSoundPunch,0))
        {
            //draw_set_alpha(0.7);
            draw_sprite(sprSoundPunch,image_index,x,y);
            //draw_circle(x + random_range(-1, 1), y + random_range(-1, 1), 16 , false);
        }
    }
    
/*   
if(instance_exists(objPlayer))
{
    with(instance_find(objPlayer, 0))
    {
        if(alarm[0] &lt;= 0)
        draw_sprite_ext(sprRed, 2, x, y, 0.7, 0.7, 0, c_white, 50);
        else if(alarm[0] &gt; 0 &amp;&amp; alarm[0] &lt; 45)
        draw_sprite_ext(sprRed, 1, x, y, 0.7, 0.7, 0, c_white, 50);
        else
        draw_sprite_ext(sprRed, 0, x, y, 0.7, 0.7, 0, c_white, 50);
        draw_sprite(objPlayer, image_index, x, y);
    }
}
*/

if(!instance_exists(objMeta))
{
    draw_sprite(sprTitle, 0, 150, 50);
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>0</PhysicsObjectKinematic>
  <PhysicsShapePoints/>
</object>
