Increased object spawn chance generally and in plain tiles specifically.
This commit is contained in:
@@ -45,11 +45,11 @@ public class ContentGenerator : MonoBehaviour
|
||||
public GameObject generateTileContent()
|
||||
{
|
||||
int chance = rand.Next(1, 101);
|
||||
if (chance < 50)
|
||||
if (chance < 25)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if (chance >= 50 && chance < 90)
|
||||
else if (chance >= 25 && chance < 80)
|
||||
{
|
||||
if (rand.Next(0, 2) == 0)
|
||||
{
|
||||
@@ -60,11 +60,11 @@ public class ContentGenerator : MonoBehaviour
|
||||
return stones[rand.Next(0, stones.Length)];
|
||||
}
|
||||
}
|
||||
else if (chance >= 90 && chance < 95)
|
||||
else if (chance >= 80 && chance < 90)
|
||||
{
|
||||
return generateEnemy();
|
||||
}
|
||||
else if (chance >= 95 && chance < 99)
|
||||
else if (chance >= 90 && chance < 95)
|
||||
{
|
||||
return boss;
|
||||
}
|
||||
|
||||
@@ -157,9 +157,9 @@ namespace Assets.Scripts.Player
|
||||
}
|
||||
|
||||
//Generating player instance for stat preview during creation
|
||||
public void generatePlayer(BasicRace playerRace, BasicClass playerClass, string name, int difficulty)
|
||||
public PlayerObject generatePlayer(BasicRace playerRace, BasicClass playerClass, string name, int difficulty)
|
||||
{
|
||||
player = new PlayerObject(name, playerRace, playerClass, difficulty);
|
||||
return new PlayerObject(name, playerRace, playerClass, difficulty);
|
||||
}
|
||||
|
||||
public void move(Vector3 input)
|
||||
|
||||
@@ -62,7 +62,7 @@ public class Tile : MonoBehaviour
|
||||
newPoint = new Vector3(rand.Next(-40, 40) + 100 * position.x, 50, rand.Next(-40, 40) + 100 * position.z);
|
||||
foreach (Vector3 vector in list)
|
||||
{
|
||||
if (Vector3.Distance(vector, newPoint) < 12.5f)
|
||||
if (Vector3.Distance(vector, newPoint) < 2.5f)
|
||||
{
|
||||
canSpawn = false;
|
||||
break;
|
||||
@@ -85,7 +85,7 @@ public class Tile : MonoBehaviour
|
||||
{
|
||||
int chance = rand.Next(1, 101);
|
||||
|
||||
if (chance >= 25)
|
||||
if (chance >= 20)
|
||||
{
|
||||
GameObject content = contentGenerator.GetComponent<ContentGenerator>().generateContent(tiletype);
|
||||
if (content != null)
|
||||
|
||||
Reference in New Issue
Block a user