Commit e7f68fc2 authored by Mikko Lainio's avatar Mikko Lainio 🇺🇦
Browse files

Randomized starting points.Tweaked navmesh setingsh.

parent 178b592c
......@@ -24,6 +24,6 @@ MonoBehaviour:
- {fileID: 3206762778314096309, guid: 2161fedcfbc849b4494944c192ffa5c5, type: 3}
- prefabs:
- {fileID: 9002888587860398046, guid: cc80abb403dd9ef4da06bc1fd164708a, type: 3}
SpawnTimeIntervalMin: 10
SpawnTimeIntervalMax: 20
FirstSpawnDelay: 3
SpawnTimeIntervalMin: 30
SpawnTimeIntervalMax: 90
FirstSpawnDelay: 1
......@@ -170,7 +170,9 @@ public class Agent : MonoBehaviour
IEnumerator AgentStartTalk()
{
// Just talk through all starting comments, after reaching first wp
Vector3 targetLoc = GameManager.instance.GetRoomWaypoints(data_.startDestination_)[0].transform.position;
List<Waypoint> pts = GameManager.instance.GetRoomWaypoints(data_.startDestination_);
Waypoint start = pts[UnityEngine.Random.Range(0, pts.Count)];
Vector3 targetLoc = start.transform.position;
SetTarget(targetLoc);
yield return new WaitUntil(() => Vector3.Distance(transform.position, targetLoc) < 1f);
foreach (StartComment comm in data_.narrativeData_.specificStartComments_)
......@@ -303,6 +305,8 @@ public class Agent : MonoBehaviour
List<Waypoint> wayPoints = new List<Waypoint>();
wayPoints = GameManager.instance.GetRoomWaypoints(data_.roomOrder_[i]);
if (wayPoints == null)
continue;
foreach (Waypoint wp in wayPoints)
{
Vector3 targetLoc = wp.transform.position;
......
......@@ -27,6 +27,7 @@ public class GameManager : MonoBehaviour
private int m_currentEnergy = 1000;
private Score.GameSession m_session = new GameSession();
private int m_nextSpawnIndex;
private Waypoint[] m_startPoints;
void Awake()
{
......
......@@ -73,10 +73,10 @@ NavMeshProjectSettings:
m_Settings:
- serializedVersion: 2
agentTypeID: 0
agentRadius: 0.2
agentRadius: 0.4
agentHeight: 2
agentSlope: 45
agentClimb: 0.75
agentClimb: 0.2
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
......
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