diff --git a/MrBigsock/Assets/Code/Character.cs b/MrBigsock/Assets/Code/Character.cs index 53472baac3f658f7ea4019df5e767f43b341c915..dbb4bda2fde991e2cb3dd32c2305f7cba590e6e3 100644 --- a/MrBigsock/Assets/Code/Character.cs +++ b/MrBigsock/Assets/Code/Character.cs @@ -18,7 +18,7 @@ namespace BigSock { public float AttackSpeed => Stats.AttackSpeed; public float baseAttackSpeed = 1; - private AudioSource[] source; + public AudioSource[] source; public AudioClip TakeDamageAudio; /* diff --git a/MrBigsock/Assets/Code/Core/Abilities/BasicProjectile1.cs b/MrBigsock/Assets/Code/Core/Abilities/BasicProjectile1.cs index f435a47baa84631c6c7fa8b8fc18c41f291fcc19..2228aa80d7bbd85693a3db662ec4de42398e0747 100644 --- a/MrBigsock/Assets/Code/Core/Abilities/BasicProjectile1.cs +++ b/MrBigsock/Assets/Code/Core/Abilities/BasicProjectile1.cs @@ -15,7 +15,8 @@ namespace BigSock { public class BasicProjectile1 : BaseAttack { //protected static readonly GameObject PROJECTILE_BASE = new AttackMovement(); public const string PROJECTILE_NAME = "bullets/basicsquarebullet"; - public const string AUDIO_PATH = "The Essential Retro Video Game Sound Effects Collection [512 sounds] By Juhani Junkala/Death Screams/Alien/sfx_deathscream_alien1"; + public const string AUDIO_PATH = "The Essential Retro Video Game Sound Effects Collection [512 sounds] By Juhani Junkala/Weapons/Melee/sfx_wpn_punch3"; + public override ulong Id => 101; @@ -59,7 +60,7 @@ namespace BigSock { bulletScript.Direction = (target.Value - (Vector2) actor.transform.position).normalized; // Play sound effect - var source = actor.source; + var source = actor.source[0]; var audioClip = AudioService.SINGLETON.Get(AUDIO_PATH); if (source != null && audioClip != null) { source.clip = audioClip; diff --git a/MrBigsock/Assets/Prefabs/backgroundMusic.prefab b/MrBigsock/Assets/Prefabs/backgroundMusic.prefab new file mode 100644 index 0000000000000000000000000000000000000000..466991debba4f040d54c38bd2e0449b43846c5cc --- /dev/null +++ b/MrBigsock/Assets/Prefabs/backgroundMusic.prefab @@ -0,0 +1,130 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7113940451868526258 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7113940451868526256} + - component: {fileID: 7113940451868526259} + m_Layer: 0 + m_Name: backgroundMusic + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7113940451868526256 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7113940451868526258} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 9.668067, y: 2.2499247, z: 0.22078483} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &7113940451868526259 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7113940451868526258} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: ae3f4e0c57ec5dc4db5c797621c02302, type: 3} + m_PlayOnAwake: 1 + m_Volume: 0.154 + m_Pitch: 1 + Loop: 1 + 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 diff --git a/MrBigsock/Assets/Prefabs/backgroundMusic.prefab.meta b/MrBigsock/Assets/Prefabs/backgroundMusic.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..6e48a32f1c99f739f5397222de0068ff7c791094 --- /dev/null +++ b/MrBigsock/Assets/Prefabs/backgroundMusic.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d1bdff0715a06334f89add2380e94407 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: