Added NPCs to game, fixed explore and collect quest, added quest remove, fixed quest update, v1.4.0
This commit is contained in:
@@ -10,7 +10,7 @@ public class ContentGenerator : MonoBehaviour
|
||||
public GameObject[] stones;
|
||||
public GameObject grass;
|
||||
public GameObject boss;
|
||||
//public GameObject npc;
|
||||
public GameObject npc;
|
||||
static System.Random rand = new System.Random();
|
||||
|
||||
public GameObject generateEnemy()
|
||||
@@ -55,14 +55,18 @@ public class ContentGenerator : MonoBehaviour
|
||||
return stones[rand.Next(0, stones.Length)];
|
||||
}
|
||||
}
|
||||
else if (chance >= 90 && chance < 99)
|
||||
else if (chance >= 90 && chance < 95)
|
||||
{
|
||||
return generateEnemy();
|
||||
}
|
||||
else
|
||||
else if(chance >= 95 && chance < 99)
|
||||
{
|
||||
return boss;
|
||||
}
|
||||
else
|
||||
{
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
|
||||
public GameObject generateStoneTileContent()
|
||||
@@ -76,14 +80,18 @@ public class ContentGenerator : MonoBehaviour
|
||||
{
|
||||
return trees[rand.Next(0, trees.Length)];
|
||||
}
|
||||
else if (chance >= 90 && chance < 99)
|
||||
else if (chance >= 90 && chance < 95)
|
||||
{
|
||||
return generateEnemy();
|
||||
}
|
||||
else
|
||||
else if (chance >= 95 && chance < 99)
|
||||
{
|
||||
return boss;
|
||||
}
|
||||
else
|
||||
{
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
|
||||
public GameObject generateTreeTileContent()
|
||||
@@ -97,14 +105,18 @@ public class ContentGenerator : MonoBehaviour
|
||||
{
|
||||
return stones[rand.Next(0, stones.Length)];
|
||||
}
|
||||
else if (chance >= 90 && chance < 99)
|
||||
else if (chance >= 90 && chance < 95)
|
||||
{
|
||||
return generateEnemy();
|
||||
}
|
||||
else
|
||||
else if (chance >= 95 && chance < 99)
|
||||
{
|
||||
return boss;
|
||||
}
|
||||
else
|
||||
{
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
|
||||
public GameObject generateRiverTileContent()
|
||||
@@ -125,14 +137,18 @@ public class ContentGenerator : MonoBehaviour
|
||||
return stones[rand.Next(0, stones.Length)];
|
||||
}
|
||||
}
|
||||
else if (chance >= 90 && chance < 99)
|
||||
else if (chance >= 90 && chance < 95)
|
||||
{
|
||||
return generateEnemy();
|
||||
}
|
||||
else
|
||||
else if (chance >= 95 && chance < 99)
|
||||
{
|
||||
return boss;
|
||||
}
|
||||
else
|
||||
{
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
|
||||
public GameObject generateLakeTileContent()
|
||||
@@ -146,14 +162,18 @@ public class ContentGenerator : MonoBehaviour
|
||||
{
|
||||
return stones[rand.Next(0, stones.Length)];
|
||||
}
|
||||
else if (chance >= 90 && chance < 99)
|
||||
else if (chance >= 90 && chance < 95)
|
||||
{
|
||||
return generateEnemy();
|
||||
}
|
||||
else
|
||||
else if (chance >= 95 && chance < 99)
|
||||
{
|
||||
return boss;
|
||||
}
|
||||
else
|
||||
{
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
|
||||
public GameObject loadObject(JToken json)
|
||||
|
||||
Reference in New Issue
Block a user