Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Mar 4, 2024
2 parents 7ad767c + e59f271 commit 71ff45f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h4>Devuelve:</h4>
<h4>Ejemplo:</h4>
<p class="code">var inst, ex, ey, ez;<br />
inst = instance_nearest(x, y, enemy);<br />
if inst<br />
if (instance_exists(inst))<br />
{<br />
    ex = inst.x;<br />
    ey = inst.y;<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h4>Ejemplo:</h4>
inst = collision_rectangle(50, 50, 200, 100, obj_Ball, false, true);<br />
if inst != noone<br />
{<br />
    with (inst) instance_destroy();<br />
    instance_destroy(inst);<br />
}</p>
<p>Este código corto utiliza collision_rectangle para comprobar un área en el <span class="notranslate">room</span> desde 50x, 50y (parte superior izquierda del rectángulo) hasta 200x, 200y (parte inferior derecha del rectángulo) para una instancia de un <span class="notranslate">object</span> llamado &quot;obj_ball&quot;. Almacena el valor de retorno en una variable temporal que luego se comprueba para ver si ese valor es un id de instancia, o la palabra clave <a href="../../../GML_Overview/Instance_Keywords.htm"><b>nadie</b></a>. Si <i>no</i> es <b>nadie</b>, utiliza el identificador de instancia almacenado para destruir el <span class="notranslate">object</span>.</p>
<p> </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@ <h2>Descarga de tablas de clasificación</h2>
<p class="code">score_get = steam_download_scores(&quot;Game Scores&quot;, 1, 10);</p>
<p>Esto enviará una petición a <span class="notranslate">Steam</span> <span class="notranslate">Server</span> para las puntuaciones de la tabla de clasificación &quot;Game Scores&quot;, almacenando el ID asíncrono de la petición en la variable &quot;<span class="inline">score_get</span>&quot;. Esto será entonces manejado en el <strong>Evento Asíncrono de Steam</strong> de la siguiente manera:</p>
<p class="code">var async_id = ds_map_find_value(async_load, &quot;id&quot;);<br />
if async_id == score_get<br />
   {<br />
   var entries = ds_map_find_value(async_load, &quot;entries&quot;);<br />
   var map = json_decode(entries);<br />
   if ds_map_exists(map, &quot;default&quot;)<br />
<br />
if (async_id == score_get)<br />
{<br />
    var entries = ds_map_find_value(async_load, &quot;entries&quot;);<br />
    var map = json_decode(entries);<br />
<br />
    if (ds_map_exists(map, &quot;default&quot;))<br />
    {<br />
        ds_map_destroy(map);<br />
        exit;<br />
    }<br />
    else<br />
    {<br />
      ds_map_destroy(map);<br />
      exit;<br />
Expand Down

0 comments on commit 71ff45f

Please sign in to comment.