Commit f827c6f7 authored by You're Perfect 's avatar You're Perfect

Improve fish spawning

parent f8e183b5
......@@ -11,7 +11,7 @@ public class FishFactory : MonoBehaviour {
public float veryRareFishProbability = 0.001f;
public float delay=60.0f*60.0f;
public bool active=true;
public float rangeVal=0;
public float rangeVal=3;
public Vector2 delayRange = new Vector2 (1, 2);
private static FishFactory Instance;
......@@ -19,7 +19,7 @@ public class FishFactory : MonoBehaviour {
{
while(howMany-- > 0)
{
Vector3 newVect = new Vector3(Instance.transform.position.x, Instance.transform.position.y + Random.Range(0, Instance.rangeVal), Instance.transform.position.z);
Vector3 newVect = new Vector3(Instance.transform.position.x, Instance.transform.position.y + Random.Range(-Instance.rangeVal, Instance.rangeVal), Instance.transform.position.z);
//Transform newTransform = transform;
//newTransform.position=transform.position = new Vector3 (transform.position.x, transform.position.y +Random.Range(0,rangeVal), transform.position.z);
......
......@@ -4563,11 +4563,11 @@ Prefab:
m_Modifications:
- target: {fileID: 4954179080412634, guid: 54f8259dd892add418a52f86c2d296d3, type: 2}
propertyPath: m_LocalPosition.x
value: 6.2838545
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4954179080412634, guid: 54f8259dd892add418a52f86c2d296d3, type: 2}
propertyPath: m_LocalPosition.y
value: -2.04
value: -4
objectReference: {fileID: 0}
- target: {fileID: 4954179080412634, guid: 54f8259dd892add418a52f86c2d296d3, type: 2}
propertyPath: m_LocalPosition.z
......@@ -10481,11 +10481,11 @@ Prefab:
m_Modifications:
- target: {fileID: 4954179080412634, guid: 54f8259dd892add418a52f86c2d296d3, type: 2}
propertyPath: m_LocalPosition.x
value: -7.205715
value: -7
objectReference: {fileID: 0}
- target: {fileID: 4954179080412634, guid: 54f8259dd892add418a52f86c2d296d3, type: 2}
propertyPath: m_LocalPosition.y
value: -2
value: -4
objectReference: {fileID: 0}
- target: {fileID: 4954179080412634, guid: 54f8259dd892add418a52f86c2d296d3, type: 2}
propertyPath: m_LocalPosition.z
......@@ -27195,7 +27195,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 96ca32d4fbab2ef48a6fae78cf4569f5, type: 3}
m_Name:
m_EditorClassIdentifier:
MinimumFishCount: 3
MinimumFishCount: 5
fishPrefabs:
- {fileID: 1165079508314556, guid: ea59b9986bae803489712a9b0395b6ec, type: 2}
- {fileID: 1165079508314556, guid: ea59b9986bae803489712a9b0395b6ec, type: 2}
......@@ -27206,7 +27206,7 @@ MonoBehaviour:
veryRareFishProbability: 0.001
delay: 5
active: 1
rangeVal: 2
rangeVal: 4
delayRange: {x: 5, y: 10}
--- !u!4 &1931222131
Transform:
......@@ -27215,7 +27215,7 @@ Transform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1931222129}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -5.95, z: 3}
m_LocalPosition: {x: 0, y: -4.52, z: 3}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 679798726}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment