Tweaks and fixes
This commit is contained in:
parent
c291109ffb
commit
c8ccda6d37
3 changed files with 10 additions and 4 deletions
|
@ -204,6 +204,7 @@ public class DungeonGenerator {
|
|||
}
|
||||
|
||||
start.spawnpoints.Add(start.GetCenter());
|
||||
end.spawnpoints.Add(start.GetCenter());
|
||||
|
||||
foreach (Vector2Int v in allDoors) {
|
||||
foreach (GenRoom r in rooms) {
|
||||
|
|
|
@ -28,6 +28,13 @@ public class EntityObjective : Objective {
|
|||
if ( activated )
|
||||
return;
|
||||
base.ActivateGoal(ply);
|
||||
|
||||
List<Transform> spawnPointList = room.GetSpawnpoints();
|
||||
if (spawnPointList.Count == 0) {
|
||||
ReachedGoal();
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( GameObject i in prefabList ) {
|
||||
Debug.Log("[ROOMS] Spawning Entity...");
|
||||
if(i == null || player == null) {
|
||||
|
@ -35,8 +42,7 @@ public class EntityObjective : Objective {
|
|||
return;
|
||||
}
|
||||
|
||||
GameObject tempObject = GameObject.Instantiate(i);
|
||||
List<Transform> spawnPointList = room.GetSpawnpoints();
|
||||
GameObject tempObject = UnityEngine.Object.Instantiate(i);
|
||||
tempObject.transform.position = spawnPointList[Random.Range(0, spawnPointList.Count)].position;
|
||||
tempObject.GetComponent<Enemy>().SetVictim(player.gameObject);
|
||||
tempObject.GetComponent<Enemy>().SetObjective(this);
|
||||
|
|
|
@ -74,9 +74,8 @@ public class PlayerMovement : MonoBehaviour {
|
|||
brakeTime = maxBrakeTime;
|
||||
braking = false;
|
||||
} else if (!braking) {
|
||||
brakeTime -= (Time.time - lastFrame) * 0.1f;
|
||||
//brakeTime -= (Time.time - lastFrame) * 0.1f;
|
||||
}
|
||||
Debug.Log(braking + " " + brakeTime);
|
||||
if (braking) {
|
||||
brakeTime += Time.time - lastFrame;
|
||||
GameController.instance.GetAudioControl().SfxStop(AudioControl.Sfx.driving);
|
||||
|
|
Loading…
Add table
Reference in a new issue