Browse Source

Merge branch 'main' of http://git.joshuareason.com/Jam/GGJ_2022 into main

main
Tau-er\Bobbster 2 years ago
parent
commit
a2d3aaaf33
16 changed files with 200 additions and 17 deletions
  1. BIN
      Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav
  2. +7
    -0
      Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav.meta
  3. BIN
      Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav
  4. +36
    -0
      Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav.meta
  5. BIN
      Assets/Art Assets/Sound/SFX/Spikes.wav
  6. +36
    -0
      Assets/Art Assets/Sound/SFX/Spikes.wav.meta
  7. BIN
      Assets/Art Assets/Sound/SFX/Subtle_Jump.wav
  8. +36
    -0
      Assets/Art Assets/Sound/SFX/Subtle_Jump.wav.meta
  9. BIN
      Assets/Scenes/MonsterWorking.unity
  10. +7
    -0
      Assets/Scenes/MonsterWorking.unity.meta
  11. BIN
      Assets/Scenes/Official Levels/Level 1.unity
  12. BIN
      Assets/Scenes/Official Levels/Level 2.unity
  13. BIN
      Assets/Scenes/Official Levels/Level 3.unity
  14. +19
    -3
      Assets/Scripts/Character/CharacterInputController.cs
  15. +1
    -1
      Assets/Scripts/LevelManager.cs
  16. +37
    -7
      Assets/Scripts/MonsterController.cs

BIN
Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav (Stored with Git LFS) View File

size 18853784

+ 7
- 0
Assets/Art Assets/Sound/Ancient_Game_Deep_Dark_Dungeon_Ambience_Loop.wav.meta View File

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

BIN
Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav (Stored with Git LFS) View File

size 263522

+ 36
- 0
Assets/Art Assets/Sound/SFX/Postive_Game_Sound.wav.meta View File

@ -0,0 +1,36 @@
fileFormatVersion: 2
guid: 25300bf305e2f6e49a92b4a22d34ad6b
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 0
quality: 1
conversionMode: 0
platformSettingOverrides:
4:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 3
quality: 1
conversionMode: 0
7:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Art Assets/Sound/SFX/Spikes.wav (Stored with Git LFS) View File

size 353536

+ 36
- 0
Assets/Art Assets/Sound/SFX/Spikes.wav.meta View File

@ -0,0 +1,36 @@
fileFormatVersion: 2
guid: 3342524d5a4ccda4283d0a1afdaf6307
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 0
quality: 1
conversionMode: 0
platformSettingOverrides:
4:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 3
quality: 1
conversionMode: 0
7:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Art Assets/Sound/SFX/Subtle_Jump.wav (Stored with Git LFS) View File

size 177602

+ 36
- 0
Assets/Art Assets/Sound/SFX/Subtle_Jump.wav.meta View File

@ -0,0 +1,36 @@
fileFormatVersion: 2
guid: f299cdaedee0d3945af92005e838736c
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 0
quality: 1
conversionMode: 0
platformSettingOverrides:
4:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 3
quality: 1
conversionMode: 0
7:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Scenes/MonsterWorking.unity (Stored with Git LFS) View File

size 110580

+ 7
- 0
Assets/Scenes/MonsterWorking.unity.meta View File

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

BIN
Assets/Scenes/Official Levels/Level 1.unity (Stored with Git LFS) View File

size 174931

BIN
Assets/Scenes/Official Levels/Level 2.unity (Stored with Git LFS) View File

size 1964746

BIN
Assets/Scenes/Official Levels/Level 3.unity (Stored with Git LFS) View File

size 594251

+ 19
- 3
Assets/Scripts/Character/CharacterInputController.cs View File

@ -26,6 +26,15 @@ public class CharacterInputController : MonoBehaviour
[SerializeField] [SerializeField]
private Animator m_animator; private Animator m_animator;
[SerializeField]
private AudioClip m_DeathSound;
[SerializeField]
private AudioClip m_VictoryClip;
[SerializeField]
private AudioClip m_JumpSound;
[SerializeField, BoxGroup("Settings")] [SerializeField, BoxGroup("Settings")]
private float m_speed = 2.0f; private float m_speed = 2.0f;
@ -79,25 +88,32 @@ public class CharacterInputController : MonoBehaviour
public void OnLandHappened() public void OnLandHappened()
{ {
m_animator.SetTrigger("Land");
m_animator.SetTrigger("Land");
} }
public void OnJumpHappened() public void OnJumpHappened()
{ {
m_animator.SetTrigger("Land"); m_animator.SetTrigger("Land");
//AudioSource.PlayClipAtPoint(m_JumpSound, transform.position);
} }
public void OnDeath(bool value) public void OnDeath(bool value)
{ {
if (value)
if (value)
{
m_animator.SetTrigger("Death"); m_animator.SetTrigger("Death");
AudioSource.PlayClipAtPoint(m_DeathSound, transform.position);
}
else else
m_animator.SetTrigger("Respawn"); m_animator.SetTrigger("Respawn");
} }
public void OnVictory(bool value) public void OnVictory(bool value)
{ {
if (value)
if (value)
{
m_animator.SetTrigger("Victory"); m_animator.SetTrigger("Victory");
AudioSource.PlayClipAtPoint(m_VictoryClip, transform.position);
}
} }

+ 1
- 1
Assets/Scripts/LevelManager.cs View File

@ -54,7 +54,7 @@ public class LevelManager : MonoBehaviour
private void Start() private void Start()
{ {
m_allResetable = FindObjectsOfType<MonoBehaviour>().OfType<IResettable>().ToArray();
m_allResetable = FindObjectsOfType<MonoBehaviour>(true).OfType<IResettable>().ToArray();
m_timer.Value = m_timeInLevel; m_timer.Value = m_timeInLevel;
m_isVictory.Value = false; m_isVictory.Value = false;

+ 37
- 7
Assets/Scripts/MonsterController.cs View File

@ -14,12 +14,16 @@ public class MonsterController : MonoBehaviour, IResettable
private GameObject[] m_possibleFrames; private GameObject[] m_possibleFrames;
[SerializeField]
private Transform m_player; private Transform m_player;
public GameObject m_defaultObject;
[SerializeField]
private float m_distance = 3;
[SerializeField] [SerializeField]
public GameObject m_defaultObject;
private Vector3 m_offset = Vector3.zero;
private bool m_hasChanged = false;
private void OnEnable() private void OnEnable()
{ {
@ -33,6 +37,7 @@ public class MonsterController : MonoBehaviour, IResettable
private void Start() private void Start()
{ {
m_player = GameObject.FindGameObjectWithTag("Player").transform;
foreach (Transform child in transform) foreach (Transform child in transform)
{ {
if (child.gameObject.activeInHierarchy) if (child.gameObject.activeInHierarchy)
@ -53,14 +58,35 @@ public class MonsterController : MonoBehaviour, IResettable
} }
} }
private void ResetMonster()
{
foreach (Transform child in transform)
{
child.gameObject.SetActive(child.gameObject == m_defaultObject);
}
}
private void OnLightChange(float value) private void OnLightChange(float value)
{ {
if (value <= 0)
float distanceToPlayer = Vector3.Distance(m_player.position, transform.position + m_offset);
if (value <= 0.1 && distanceToPlayer < m_distance && !m_hasChanged)
{ {
Debug.Log(distanceToPlayer);
ChangeRandomMonster(); ChangeRandomMonster();
m_hasChanged = true;
}
else if (value <= 0)
{
ResetMonster();
}
if (value > 0.5)
{
m_hasChanged = false;
} }
} }
public void OnLevelLoad() public void OnLevelLoad()
@ -75,9 +101,13 @@ public class MonsterController : MonoBehaviour, IResettable
public void OnResetEnd() public void OnResetEnd()
{ {
foreach (Transform child in transform)
{
child.gameObject.SetActive(child.gameObject == m_defaultObject);
}
ResetMonster();
}
private void OnDrawGizmosSelected()
{
Gizmos.color = Color.yellow;
Gizmos.DrawWireSphere(transform.position + m_offset, m_distance);
} }
} }

Loading…
Cancel
Save