What? I just added a few extra surprises...
This commit is contained in:
@@ -11,7 +11,8 @@ namespace DepthsBelow
|
|||||||
{
|
{
|
||||||
//EntityManager entityManager;
|
//EntityManager entityManager;
|
||||||
|
|
||||||
int wakingDistance = 6;
|
int wakingDistance = 7;
|
||||||
|
int sleepingDistance = 6;
|
||||||
|
|
||||||
List<SmallEnemy> swarm;
|
List<SmallEnemy> swarm;
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ namespace DepthsBelow
|
|||||||
this.GetComponent<Component.Transform>().Grid.Position.Y);
|
this.GetComponent<Component.Transform>().Grid.Position.Y);
|
||||||
Vector2 distance2 = new Vector2(entity.GetComponent<Component.Transform>().Grid.Position.X,
|
Vector2 distance2 = new Vector2(entity.GetComponent<Component.Transform>().Grid.Position.X,
|
||||||
entity.GetComponent<Component.Transform>().Grid.Position.Y);
|
entity.GetComponent<Component.Transform>().Grid.Position.Y);
|
||||||
if (Vector2.Distance(distance1, distance2) < wakingDistance)
|
if (Vector2.Distance(distance1, distance2) < wakingDistance/* && Vector2.Distance(distance1, distance2) > sleepingDistance*/)
|
||||||
{
|
{
|
||||||
var enemy = new SmallEnemy(entityManager, ref swarm);
|
var enemy = new SmallEnemy(entityManager, ref swarm);
|
||||||
enemy.X = this.X;
|
enemy.X = this.X;
|
||||||
|
|||||||
@@ -29,6 +29,13 @@
|
|||||||
<object type="SquadStart" gid="4" x="384" y="352"/>
|
<object type="SquadStart" gid="4" x="384" y="352"/>
|
||||||
<object type="MonsterSpawn" gid="5" x="544" y="480"/>
|
<object type="MonsterSpawn" gid="5" x="544" y="480"/>
|
||||||
<object type="MonsterSpawn" gid="5" x="768" y="608"/>
|
<object type="MonsterSpawn" gid="5" x="768" y="608"/>
|
||||||
|
<object type="MonsterSpawn" gid="5" x="768" y="576"/>
|
||||||
|
<object type="MonsterSpawn" gid="5" x="672" y="288"/>
|
||||||
|
<object type="MonsterSpawn" gid="5" x="704" y="832"/>
|
||||||
|
<object type="MonsterSpawn" gid="5" x="864" y="832"/>
|
||||||
|
<object type="MonsterSpawn" gid="5" x="576" y="896"/>
|
||||||
|
<object type="MonsterSpawn" gid="5" x="448" y="576"/>
|
||||||
|
<object type="MonsterSpawn" gid="5" x="560" y="670"/>
|
||||||
</objectgroup>
|
</objectgroup>
|
||||||
<layer name="Collision" width="100" height="100">
|
<layer name="Collision" width="100" height="100">
|
||||||
<data encoding="base64" compression="zlib">
|
<data encoding="base64" compression="zlib">
|
||||||
|
|||||||
Reference in New Issue
Block a user