Implement interval logic for emitters

This commit is contained in:
Juliana Sims 2024-05-23 16:28:53 -04:00
parent 65076c40f3
commit 13aa8606a9
6 changed files with 65 additions and 30 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.8" tiledversion="1.8.6" orientation="orthogonal" renderorder="right-down" width="20" height="15" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="23">
<map version="1.8" tiledversion="1.8.6" orientation="orthogonal" renderorder="right-down" width="20" height="15" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="26">
<tileset firstgid="1" source="tiles.tsx"/>
<layer id="1" name="background" width="20" height="15">
<data encoding="csv">
@ -7,13 +7,13 @@
81,83,83,82,83,83,83,82,83,83,83,83,82,83,83,84,23,23,23,23,
85,24,24,24,24,24,24,24,24,24,24,24,24,24,24,106,81,82,82,84,
105,24,24,24,24,24,24,24,24,24,24,24,24,24,24,106,105,24,24,86,
105,24,49,3,3,24,3,3,3,3,3,3,24,24,24,106,105,24,24,106,
105,24,24,3,3,24,3,3,3,3,3,3,24,24,24,106,105,24,24,106,
85,24,24,24,24,24,24,24,24,24,24,24,24,3,24,106,105,24,24,106,
85,24,24,24,24,24,49,3,3,3,3,3,24,24,24,24,24,24,24,106,
85,24,24,24,24,24,24,3,3,3,3,3,24,24,24,24,24,24,24,106,
85,24,24,24,24,24,24,24,24,24,24,24,24,24,24,106,105,24,24,106,
85,24,24,24,24,24,24,24,24,24,24,24,24,24,24,106,105,28,24,86,
105,24,24,24,24,24,24,24,24,24,24,24,24,24,81,104,105,24,24,86,
105,49,3,3,24,61,61,66,24,24,24,24,24,24,106,23,105,24,24,86,
105,24,3,3,24,61,61,66,24,24,24,24,24,24,106,23,105,24,24,86,
85,24,24,24,24,24,24,64,61,61,24,3,3,24,86,23,101,102,102,104,
101,103,103,102,102,102,103,102,103,103,102,102,102,102,104,23,23,23,23,23,
23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,
@ -57,5 +57,20 @@
<property name="target-y" type="int" value="10"/>
</properties>
</object>
<object id="23" type="clock-emitter" gid="49" x="96" y="96" width="16" height="16">
<properties>
<property name="interval" type="int" value="4"/>
</properties>
</object>
<object id="24" type="clock-emitter" gid="49" x="32" y="64" width="16" height="16">
<properties>
<property name="interval" type="int" value="4"/>
</properties>
</object>
<object id="25" type="clock-emitter" gid="49" x="16" y="160" width="16" height="16">
<properties>
<property name="interval" type="int" value="4"/>
</properties>
</object>
</objectgroup>
</map>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.8" tiledversion="1.8.6" orientation="orthogonal" renderorder="right-down" width="20" height="15" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="21">
<map version="1.8" tiledversion="1.8.6" orientation="orthogonal" renderorder="right-down" width="20" height="15" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="24">
<tileset firstgid="1" source="tiles.tsx"/>
<layer id="1" name="background" width="20" height="15">
<data encoding="csv">
@ -8,11 +8,11 @@
23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,
23,23,24,24,24,24,24,24,24,24,24,24,24,24,23,23,23,23,23,23,
23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,23,
23,24,24,24,24,49,3,24,3,24,24,24,24,24,24,23,24,28,24,23,
23,24,24,24,24,24,3,24,3,24,24,24,24,24,24,23,24,28,24,23,
23,24,24,24,24,24,24,24,24,24,3,24,24,24,24,23,24,24,24,23,
23,24,24,24,24,48,3,3,3,24,24,24,3,24,24,24,24,24,24,23,
23,24,24,24,24,24,3,3,3,24,24,24,3,24,24,24,24,24,24,23,
23,24,24,24,24,24,24,24,24,24,3,24,24,24,24,23,24,24,24,23,
23,24,49,3,3,24,3,3,3,24,24,24,24,24,24,23,24,24,24,23,
23,24,24,3,3,24,3,3,3,24,24,24,24,24,24,23,24,24,24,23,
23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,23,
23,23,24,24,24,24,24,24,24,24,24,24,24,24,23,23,23,23,23,23,
23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,
@ -55,5 +55,20 @@
<property name="target-y" type="int" value="7"/>
</properties>
</object>
<object id="21" type="clock-emitter" gid="49" x="80" y="80" width="16" height="16">
<properties>
<property name="interval" type="int" value="4"/>
</properties>
</object>
<object id="22" type="clock-emitter" gid="49" x="32" y="144" width="16" height="16">
<properties>
<property name="interval" type="int" value="1"/>
</properties>
</object>
<object id="23" type="switched-emitter" gid="48" x="80" y="112" width="16" height="16">
<properties>
<property name="interval" type="int" value="4"/>
</properties>
</object>
</objectgroup>
</map>

View file

@ -12,8 +12,6 @@
</properties>
</tile>
<tile id="27" type="exit"/>
<tile id="47" type="switched-emitter"/>
<tile id="48" type="clock-emitter"/>
<tile id="80" type="wall">
<properties>
<property name="kind" value="brick"/>