Start on attempt to consolidate multiple scenes into one

This commit is contained in:
2022-08-19 14:36:04 -07:00
parent 4e39c75095
commit 82fe821806
11 changed files with 7874 additions and 25 deletions

View File

@@ -205,9 +205,24 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3dc835db21e8a7244a1e4ca279799cd6, type: 3} m_Script: {fileID: 11500000, guid: 3dc835db21e8a7244a1e4ca279799cd6, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
grassStep: {fileID: 8300000, guid: 539d0bf64e3207c43bbdcd75fa6f271d, type: 3} grassStep:
templeStep: {fileID: 8300000, guid: b4cbe01d1f5ccab4bbfbc780613fc59e, type: 3} audioClip: {fileID: 0}
sandStep: {fileID: 8300000, guid: fb2c6dc162e24d94ebb3c3dba7cdb911, type: 3} pitchMin: 0
pitchMax: 0
volumeMin: 0
volumeMax: 0
templeStep:
audioClip: {fileID: 0}
pitchMin: 0
pitchMax: 0
volumeMin: 0
volumeMax: 0
sandStep:
audioClip: {fileID: 0}
pitchMin: 0
pitchMax: 0
volumeMin: 0
volumeMax: 0
audioSource: {fileID: 8343511731192482761} audioSource: {fileID: 8343511731192482761}
--- !u!82 &8343511731192482761 --- !u!82 &8343511731192482761
AudioSource: AudioSource:
@@ -1001,7 +1016,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6949365541298368387} m_GameObject: {fileID: 6949365541298368387}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -38.886, y: 12.41, z: -15.738} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 1 m_ConstrainProportionsScale: 1
m_Children: m_Children:
@@ -1102,9 +1117,24 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3dc835db21e8a7244a1e4ca279799cd6, type: 3} m_Script: {fileID: 11500000, guid: 3dc835db21e8a7244a1e4ca279799cd6, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
grassStep: {fileID: 8300000, guid: 539d0bf64e3207c43bbdcd75fa6f271d, type: 3} grassStep:
templeStep: {fileID: 8300000, guid: b4cbe01d1f5ccab4bbfbc780613fc59e, type: 3} audioClip: {fileID: 8300000, guid: 539d0bf64e3207c43bbdcd75fa6f271d, type: 3}
sandStep: {fileID: 8300000, guid: fb2c6dc162e24d94ebb3c3dba7cdb911, type: 3} pitchMin: 0
pitchMax: 0
volumeMin: 0.6
volumeMax: 0.8
templeStep:
audioClip: {fileID: 8300000, guid: b4cbe01d1f5ccab4bbfbc780613fc59e, type: 3}
pitchMin: 0.7
pitchMax: 1.1
volumeMin: 0.6
volumeMax: 1
sandStep:
audioClip: {fileID: 8300000, guid: fb2c6dc162e24d94ebb3c3dba7cdb911, type: 3}
pitchMin: 0
pitchMax: 0
volumeMin: 0
volumeMax: 0
audioSource: {fileID: -5973425731125482380} audioSource: {fileID: -5973425731125482380}
--- !u!82 &-5973425731125482380 --- !u!82 &-5973425731125482380
AudioSource: AudioSource:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 47f46a65c6a9c8f4aa201e9b549862c6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -2725,6 +2725,10 @@ PrefabInstance:
propertyPath: m_Layer propertyPath: m_Layer
value: 7 value: 7
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7607175870710481519, guid: 8ceeae119e95aeb46b0ece6d23daffbd, type: 3}
propertyPath: panLevelCustomCurve.m_Curve.Array.data[0].value
value: 0.505
objectReference: {fileID: 0}
- target: {fileID: 8159499173479043375, guid: 8ceeae119e95aeb46b0ece6d23daffbd, type: 3} - target: {fileID: 8159499173479043375, guid: 8ceeae119e95aeb46b0ece6d23daffbd, type: 3}
propertyPath: m_Layer propertyPath: m_Layer
value: 7 value: 7

View File

@@ -4,6 +4,7 @@ using UnityEngine.SceneManagement;
namespace Scampz.GameJam.Assets.Scripts namespace Scampz.GameJam.Assets.Scripts
{ {
[RequireComponent(typeof(AudioSource))]
public class BGMManager : MonoBehaviour public class BGMManager : MonoBehaviour
{ {

View File

@@ -3,25 +3,29 @@ using UnityEngine;
namespace Scampz.GameJam namespace Scampz.GameJam
{ {
[RequireComponent(typeof(AudioSource))]
public class Footsteps : MonoBehaviour public class Footsteps : MonoBehaviour
{ {
[SerializeField] [SerializeField]
private AudioClip grassStep; private SFXClip grassStep;
[SerializeField] [SerializeField]
private AudioClip templeStep; private SFXClip templeStep;
[SerializeField] [SerializeField]
private AudioClip sandStep; private SFXClip sandStep;
[SerializeField] [SerializeField]
private AudioSource audioSource; private AudioSource audioSource;
public void Step() public void Step()
{ {
Debug.Log("Step SFX"); Debug.Log("Step SFX");
var clip = GetAudioClip(); var soundEffect = GetAudioClip();
audioSource.PlayOneShot(clip); audioSource.pitch = Random.Range(soundEffect.pitchMin, soundEffect.pitchMax);
audioSource.volume = Random.Range(soundEffect.volumeMin, soundEffect.volumeMax);
audioSource.clip = soundEffect.audioClip;
audioSource.PlayOneShot(soundEffect.audioClip);
} }
private AudioClip GetAudioClip() private SFXClip GetAudioClip()
{ {
var terrainType = TerrainTypeFinder.Find(); var terrainType = TerrainTypeFinder.Find();
switch (terrainType) switch (terrainType)
@@ -37,4 +41,14 @@ namespace Scampz.GameJam
return templeStep; return templeStep;
} }
} }
[System.Serializable]
public struct SFXClip
{
public AudioClip audioClip;
public float pitchMin;
public float pitchMax;
public float volumeMin;
public float volumeMax;
}
} }

View File

@@ -39,7 +39,7 @@ namespace Scampz.GameJam.Assets.Scripts.Audio
=> _soundEffects.SoundEffects.Where(x => x.name.Equals(desiredSoundEffect)).Single(); => _soundEffects.SoundEffects.Where(x => x.name.Equals(desiredSoundEffect)).Single();
} }
public class SoundEffect public class SoundEffectName
{ {
public static string ComputerTalk => "computer talk ed"; public static string ComputerTalk => "computer talk ed";

View File

@@ -65,7 +65,7 @@ namespace Scampz.GameJam
return; return;
} }
SFXManager.Instance.PlaySoundEffect(SoundEffect.Narration); SFXManager.Instance.PlaySoundEffect(SoundEffectName.Narration);
var sentence = sentences.Dequeue(); var sentence = sentences.Dequeue();
StopAllCoroutines(); StopAllCoroutines();
@@ -86,7 +86,7 @@ namespace Scampz.GameJam
yield return new WaitForSecondsRealtime(1f); yield return new WaitForSecondsRealtime(1f);
SFXManager.Instance.StopSoundEffect(); SFXManager.Instance.StopSoundEffect();
yield return new WaitForKeyDown(InputOptions.Submit); yield return new WaitForKeyDown(InputOptions.Submit);
SFXManager.Instance.PlaySoundEffect(SoundEffect.Ok); SFXManager.Instance.PlaySoundEffect(SoundEffectName.Ok);
yield return new WaitForSeconds(0.5f); yield return new WaitForSeconds(0.5f);
DisplayNextSentence(); DisplayNextSentence();
} }

View File

@@ -26,12 +26,14 @@ public class PlayerSpawnController : MonoBehaviour
{ {
_player = GameObject.FindGameObjectWithTag("Player"); _player = GameObject.FindGameObjectWithTag("Player");
_player.transform.position = _spawnLocation.transform.position; _player.transform.position = _spawnLocation.transform.position;
_player.transform.rotation = _spawnLocation.transform.rotation;
} }
else else
{ {
_player = Instantiate(_playerPrefab); _player = Instantiate(_playerPrefab);
_player.transform.position = _spawnLocation.transform.position; _player.transform.position = _spawnLocation.transform.position;
_player.transform.rotation = _spawnLocation.transform.rotation;
DontDestroyOnLoad(_player); DontDestroyOnLoad(_player);
} }
} }

View File

@@ -8,13 +8,11 @@ namespace Scampz.GameJam.Assets.Scripts
private CharacterController _controller; private CharacterController _controller;
public float Speed = 10f; public float Speed = 10f;
public float RotateSpeed = 720.0f; public float RotateSpeed = 720.0f;
private Animator _animator;
private PlayerState _playerState; private PlayerState _playerState;
private void Start() private void Start()
{ {
_controller = GetComponent<CharacterController>(); _controller = GetComponent<CharacterController>();
_animator = GetComponent<Animator>();
_playerState = GetComponent<PlayerState>(); _playerState = GetComponent<PlayerState>();
} }

View File

@@ -4,13 +4,11 @@
TagManager: TagManager:
serializedVersion: 2 serializedVersion: 2
tags: tags:
- From TempleA To Temple B - TempleA
- From TempleB to Temple C - TempleB
- From TempleC to Temple Sanctum - TempleC
- From Temple Sanctum to Temple C - TempleD
- From Temple C to Temple B - Sanctum
- From Temple B to Temple A
- From Temple A to World Map
layers: layers:
- Default - Default
- TransparentFX - TransparentFX