diff --git a/Assets/Audio/Effects/crossbow shot.mp3 b/Assets/Audio/Effects/crossbow shot.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..73f5666789fcbe06fafec7b9e51bea526250becb --- /dev/null +++ b/Assets/Audio/Effects/crossbow shot.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b3a84980ea5cba678a51b4801d0ad8fe2613c54f9ff0aea9f49bd65b075e46b +size 16320 diff --git a/Assets/Audio/Effects/crossbow shot.mp3.meta b/Assets/Audio/Effects/crossbow shot.mp3.meta new file mode 100644 index 0000000000000000000000000000000000000000..90c7c7ab55820b8fff36d1dc0d19648e1071225b --- /dev/null +++ b/Assets/Audio/Effects/crossbow shot.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1f660a7f70aaaf94e94019c8a23e3114 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BowShooting.cs b/Assets/BowShooting.cs index 30397189ecd6db4c0f1af5d8fce9120269ed3bd7..4e01728f366d0ffaf9fde469679441eadf12f79e 100644 --- a/Assets/BowShooting.cs +++ b/Assets/BowShooting.cs @@ -14,9 +14,11 @@ public class BowShooting : MonoBehaviour public float maxRotation; public float angle; private bool fire; + AudioSource audioSource; void Start() { + audioSource = GetComponent<AudioSource>(); firePowerSpeed = 5; bow.Reload(); } @@ -33,11 +35,12 @@ public class BowShooting : MonoBehaviour } if (fire && firePowerSpeed < maxPower) { - firePowerSpeed += Time.deltaTime * firePowerSpeed; + firePowerSpeed += Time.deltaTime * firePowerSpeed/2; } if (fire && Input.GetButtonUp("Fire1")) { bow.Shoot(firePowerSpeed); + audioSource.Play(); firePowerSpeed = 0; fire = false; } diff --git a/Assets/Scenes/Level_01.unity b/Assets/Scenes/Level_01.unity index 02b8d498bb94ee0f2c378b22cf0441a03c318ba8..3ef265c3a32693d774b35234f737aebcf610faab 100644 --- a/Assets/Scenes/Level_01.unity +++ b/Assets/Scenes/Level_01.unity @@ -248,7 +248,7 @@ AudioSource: m_GameObject: {fileID: 33945473} m_Enabled: 1 serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} + OutputAudioMixerGroup: {fileID: 24300002, guid: 5b84db49d40ea449aa4f3e3bd229ab5b, type: 2} m_audioClip: {fileID: 8300000, guid: 352735f28fe99b643a447f955cee8df3, type: 3} m_PlayOnAwake: 1 m_Volume: 1 @@ -2056,134 +2056,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 300986610} m_CullTransparentMesh: 1 ---- !u!1 &312147397 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: c9a73f42c15ac4f48a92c5f435471f7f, type: 3} - m_PrefabInstance: {fileID: 216831668} - m_PrefabAsset: {fileID: 0} ---- !u!82 &312147400 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 312147397} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 8300000, guid: 352735f28fe99b643a447f955cee8df3, type: 3} - m_PlayOnAwake: 0 - m_Volume: 1 - m_Pitch: 1 - Loop: 0 - Mute: 0 - Spatialize: 0 - SpatializePostEffects: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 0 - rolloffCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - panLevelCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - spreadCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - reverbZoneMixCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 ---- !u!114 &312147401 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 312147397} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a6b58c9316ec3f049bf3341f992d65d5, type: 3} - m_Name: - m_EditorClassIdentifier: - damagePerShot: 10 ---- !u!136 &312147402 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 312147397} - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_Enabled: 1 - m_Radius: 0.15 - m_Height: 1.5 - m_Direction: 2 - m_Center: {x: 0, y: 0, z: -0.3} --- !u!1001 &313615516 PrefabInstance: m_ObjectHideFlags: 0 @@ -2672,7 +2544,6 @@ GameObject: - component: {fileID: 450320209} - component: {fileID: 450320208} - component: {fileID: 450320213} - - component: {fileID: 450320207} m_Layer: 0 m_Name: ShotgunEnd m_TagString: PlayerWeapon diff --git a/Assets/Scripts/Player/Shotgun.cs b/Assets/Scripts/Player/Shotgun.cs index fd9a6aa2f8cb15c43105d78cef54cff5d8ca7be4..00fd1eb80334f8cf4b7f8e3956f50b50604ea723 100644 --- a/Assets/Scripts/Player/Shotgun.cs +++ b/Assets/Scripts/Player/Shotgun.cs @@ -91,6 +91,7 @@ public class Shotgun : MonoBehaviour Vector3 direction = transform.forward; direction.x += idx * 0.1f; + direction.z += idx * 0.1f; Ray shootRayMultiple = new Ray(transform.position, direction); diff --git a/Assets/Scripts/Quest/QuestManager.cs b/Assets/Scripts/Quest/QuestManager.cs index df00913e1aa7f51a4454c2061927fa2d0bf82d04..642d6e3f0764ff66c35fd37302dad2d2d34828f1 100644 --- a/Assets/Scripts/Quest/QuestManager.cs +++ b/Assets/Scripts/Quest/QuestManager.cs @@ -84,8 +84,11 @@ public class QuestManager : MonoBehaviour new List<MonsterType>() { MonsterType.SOULEATER }, 100 )); - - StartCoroutine(nextQuest()); + if (activeQuestIdx == 0) + { + StartCoroutine(nextQuest()); + } + } void Update() @@ -163,10 +166,8 @@ public class QuestManager : MonoBehaviour private IEnumerator LoadVictoryScene() { - Debug.Log("Victory"); yield return new WaitForSeconds(3); SceneManager.LoadScene("Victory"); - Debug.Log("tes"); } private IEnumerator nextQuest() diff --git a/Assets/WeaponHandling.cs b/Assets/WeaponHandling.cs index d4e073be476a79ec6197f60ab387774c2580aabe..3dd18ef142d8d2aa3c2cdacb8a609b53cfc9830b 100644 --- a/Assets/WeaponHandling.cs +++ b/Assets/WeaponHandling.cs @@ -19,6 +19,34 @@ public class WeaponHandling : MonoBehaviour // Update is called once per frame void Update() { + if (weaponIdx == 0){ + Rifle.SetActive(true); + RifleEnd.SetActive(true); + Shotgun.SetActive(false); + Bow.SetActive(false); + Sword.SetActive(false); + } + else if (weaponIdx == 1){ + Rifle.SetActive(false); + RifleEnd.SetActive(false); + Shotgun.SetActive(true); + Bow.SetActive(false); + Sword.SetActive(false); + } + else if (weaponIdx == 2){ + Rifle.SetActive(false); + RifleEnd.SetActive(false); + Shotgun.SetActive(false); + Bow.SetActive(false); + Sword.SetActive(true); + } + else if (weaponIdx == 3){ + Rifle.SetActive(false); + RifleEnd.SetActive(false); + Shotgun.SetActive(false); + Bow.SetActive(true); + Sword.SetActive(false); + } if (Input.GetKeyDown("1")) { weaponIdx = 0;