Increased object spawn chance generally and in plain tiles specifically.

This commit is contained in:
finnchen123
2026-02-06 13:38:09 +01:00
parent b657de5ea0
commit 2562321918
7 changed files with 118 additions and 124 deletions

View File

@@ -370,7 +370,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Einfach
m_Text: Easy
--- !u!222 &22113748
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -1006,7 +1006,7 @@ RectTransform:
m_Children: []
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.55}
m_AnchorMin: {x: 0.1, y: 0.55}
m_AnchorMax: {x: 0.5, y: 0.65}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
@@ -1038,7 +1038,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
@@ -2314,7 +2314,7 @@ RectTransform:
m_Children: []
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.65}
m_AnchorMin: {x: 0.1, y: 0.65}
m_AnchorMax: {x: 0.5, y: 0.75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
@@ -2346,7 +2346,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
@@ -3352,7 +3352,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Krieger
m_Text: Warrior
--- !u!222 &385059081
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -3566,37 +3566,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 402060856}
m_CullTransparentMesh: 1
--- !u!1 &446493448
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 446493449}
m_Layer: 0
m_Name: GameData
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &446493449
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 446493448}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 959.6816, y: 0, z: 3891.7393}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &447210028
GameObject:
m_ObjectHideFlags: 0
@@ -7072,7 +7041,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "Klein (5 St\xE4dte)"
m_Text: K
--- !u!222 &929276014
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -7760,7 +7729,7 @@ RectTransform:
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.65}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchorMax: {x: 0.9, y: 0.75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
@@ -8892,7 +8861,7 @@ RectTransform:
m_Children: []
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.35}
m_AnchorMin: {x: 0.1, y: 0.35}
m_AnchorMax: {x: 0.5, y: 0.45}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
@@ -8924,7 +8893,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
@@ -9633,7 +9602,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Deutsch
m_Text: 800x600
--- !u!222 &1225249785
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -10348,7 +10317,7 @@ RectTransform:
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.35}
m_AnchorMax: {x: 1, y: 0.45}
m_AnchorMax: {x: 0.9, y: 0.45}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
@@ -10601,7 +10570,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Mensch
m_Text: Human
--- !u!222 &1332405179
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -11246,7 +11215,7 @@ RectTransform:
m_Children: []
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.45}
m_AnchorMin: {x: 0.1, y: 0.45}
m_AnchorMax: {x: 0.5, y: 0.55}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
@@ -11278,7 +11247,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
@@ -11364,7 +11333,7 @@ RectTransform:
m_Children: []
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.75}
m_AnchorMin: {x: 0.1, y: 0.75}
m_AnchorMax: {x: 0.5, y: 0.85}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
@@ -11396,7 +11365,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
@@ -14153,7 +14122,7 @@ RectTransform:
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.55}
m_AnchorMax: {x: 1, y: 0.65}
m_AnchorMax: {x: 0.9, y: 0.65}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
@@ -15750,7 +15719,7 @@ RectTransform:
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.75}
m_AnchorMax: {x: 1, y: 0.85}
m_AnchorMax: {x: 0.9, y: 0.85}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
@@ -16483,7 +16452,7 @@ RectTransform:
m_Father: {fileID: 2093776663}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.45}
m_AnchorMax: {x: 1, y: 0.55}
m_AnchorMax: {x: 0.9, y: 0.55}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
@@ -16701,7 +16670,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Fenster
m_Text: Window
--- !u!222 &1955851823
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -17553,7 +17522,7 @@ RectTransform:
m_Father: {fileID: 1481292146}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.75, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
@@ -18003,5 +17972,4 @@ SceneRoots:
- {fileID: 1311414698}
- {fileID: 356515707}
- {fileID: 990713968}
- {fileID: 446493449}
- {fileID: 1338623869}

View File

@@ -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;
}

View File

@@ -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)

View File

@@ -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)