diff --git a/.gitignore b/.gitignore index e1d4125..2ac996c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ sysinfo.txt # Unity3D generated meta files *.pidb.meta +.vs/ ### # VS/MD solution and project files diff --git a/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide b/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide index 119d87d..14bf814 100644 Binary files a/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide and b/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide differ diff --git a/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide-shm b/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide-shm deleted file mode 100644 index ea927af..0000000 Binary files a/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide-shm and /dev/null differ diff --git a/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide-wal b/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide-wal deleted file mode 100644 index ccff664..0000000 Binary files a/.vs/GlobalGameJame/v16/Server/sqlite3/storage.ide-wal and /dev/null differ diff --git a/Assets/Prefabs/BarricadeField.prefab b/Assets/Prefabs/BarricadeField.prefab index 56f1a96..279813c 100644 --- a/Assets/Prefabs/BarricadeField.prefab +++ b/Assets/Prefabs/BarricadeField.prefab @@ -12,6 +12,7 @@ GameObject: - component: {fileID: 2404547677224573955} - component: {fileID: 7533051242826683670} - component: {fileID: 3536865177621166868} + - component: {fileID: -183831788463918190} m_Layer: 9 m_Name: BarricadeField m_TagString: BarricadeField @@ -75,6 +76,8 @@ MonoBehaviour: - {fileID: 5859715434797674372} offMeshLink: {fileID: 3536865177621166868} walkPoint: {fileID: 9070811066647654375} + audioSource: {fileID: -183831788463918190} + buildSound: {fileID: 8300000, guid: 2bffca641d6de514cb3780b4b3b1497d, type: 3} --- !u!191 &3536865177621166868 OffMeshLink: m_ObjectHideFlags: 0 @@ -92,6 +95,102 @@ OffMeshLink: m_BiDirectional: 1 m_Activated: 1 m_AutoUpdatePositions: 0 +--- !u!82 &-183831788463918190 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2404547677224573953} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + 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!1 &4107548373133362469 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Weapon_1.prefab b/Assets/Prefabs/Weapon_1.prefab index b52fba4..2a87f9b 100644 --- a/Assets/Prefabs/Weapon_1.prefab +++ b/Assets/Prefabs/Weapon_1.prefab @@ -10,6 +10,7 @@ GameObject: m_Component: - component: {fileID: 2179056336067526864} - component: {fileID: 5029589411118839234} + - component: {fileID: -1682145434106595162} m_Layer: 0 m_Name: Weapon_1 m_TagString: Untagged @@ -52,6 +53,107 @@ MonoBehaviour: type: 3} damage: 5 fireRate: 0.5 + animator: {fileID: 0} + player: {fileID: 0} + hit: 0 + audioSource: {fileID: -1682145434106595162} + shootSound: {fileID: 8300000, guid: f8179c48d63ecda4aad05d68f0c60de8, type: 3} +--- !u!82 &-1682145434106595162 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2179056336067526865} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + 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!1 &4234349944776735638 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/door.prefab b/Assets/Prefabs/door.prefab index 6013152..c02f094 100644 --- a/Assets/Prefabs/door.prefab +++ b/Assets/Prefabs/door.prefab @@ -15,6 +15,7 @@ GameObject: - component: {fileID: 8296172668023712162} - component: {fileID: 8296172668023712163} - component: {fileID: 8296172668023712160} + - component: {fileID: -2813215890939452537} m_Layer: 0 m_Name: door m_TagString: Interact @@ -144,3 +145,103 @@ MonoBehaviour: m_EditorClassIdentifier: blockType: 2 health: 100 + healthRate: 5 + amountModels: [] + audioSource: {fileID: -2813215890939452537} + doorSound: {fileID: 8300000, guid: 2d61bf54062da3843bc9fa509ef34673, type: 3} +--- !u!82 &-2813215890939452537 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6358013410880778399} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + 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 diff --git a/Assets/Scenes/Test-Haitem.unity b/Assets/Scenes/Test-Haitem.unity index bbd2203..dd76f1a 100644 --- a/Assets/Scenes/Test-Haitem.unity +++ b/Assets/Scenes/Test-Haitem.unity @@ -811,7 +811,7 @@ RectTransform: - {fileID: 1692949638} - {fileID: 1327297297} m_Father: {fileID: 0} - m_RootOrder: 19 + m_RootOrder: 18 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -1006,7 +1006,7 @@ Transform: m_LocalScale: {x: 100, y: 100, z: 100} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 20 + m_RootOrder: 19 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &802293424 GameObject: @@ -1379,7 +1379,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 17 + m_RootOrder: 16 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &1131703976 stripped Transform: @@ -1837,7 +1837,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 16 + m_RootOrder: 15 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1765588425 PrefabInstance: @@ -1959,7 +1959,7 @@ MonoBehaviour: - {fileID: 1131703976} - {fileID: 675280671} - {fileID: 1872983114} - enemyNumber: 10 + enemyStartNumber: 5 Sun: {fileID: 1345459422} --- !u!4 &1774516110 Transform: @@ -1973,7 +1973,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 18 + m_RootOrder: 17 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1814508279 stripped GameObject: @@ -2066,7 +2066,7 @@ PrefabInstance: - target: {fileID: 8150345748488139403, guid: b5bdffdb5058d5e458831042023d3abc, type: 3} propertyPath: m_RootOrder - value: 15 + value: 14 objectReference: {fileID: 0} - target: {fileID: 8150345748488139403, guid: b5bdffdb5058d5e458831042023d3abc, type: 3} @@ -2902,7 +2902,7 @@ PrefabInstance: - target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c, type: 3} propertyPath: m_RootOrder - value: 14 + value: 20 objectReference: {fileID: 0} - target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c, type: 3} diff --git a/Assets/Scripts/BarricadeManager.cs b/Assets/Scripts/BarricadeManager.cs index ed865f2..09e24e1 100644 --- a/Assets/Scripts/BarricadeManager.cs +++ b/Assets/Scripts/BarricadeManager.cs @@ -10,6 +10,9 @@ public class BarricadeManager : MonoBehaviour public OffMeshLink offMeshLink; public Transform walkPoint; + public AudioSource audioSource = new AudioSource(); + public AudioClip buildSound; + // Start is called before the first frame update void Start() { @@ -37,6 +40,7 @@ public class BarricadeManager : MonoBehaviour public void addPlank() { if (health < (barricadePlanks.Count * 50)) { + audioSource.PlayOneShot(buildSound); health += 50; offMeshLink.enabled = false; } diff --git a/Assets/Scripts/BlockManager.cs b/Assets/Scripts/BlockManager.cs index cc53ceb..0dc3017 100644 --- a/Assets/Scripts/BlockManager.cs +++ b/Assets/Scripts/BlockManager.cs @@ -14,6 +14,9 @@ public class BlockManager : MonoBehaviour private bool action = false; public List amountModels = new List(); + public AudioSource audioSource = new AudioSource(); + public AudioClip doorSound; + // Start is called before the first frame update void Start() { @@ -97,6 +100,7 @@ public class BlockManager : MonoBehaviour { if (!animation.isPlaying) { + audioSource.PlayOneShot(doorSound); if (!action) { animation["Door"].speed = 1; diff --git a/Assets/Scripts/DayManager.cs b/Assets/Scripts/DayManager.cs index dfd1c57..7a6f136 100644 --- a/Assets/Scripts/DayManager.cs +++ b/Assets/Scripts/DayManager.cs @@ -11,6 +11,8 @@ public class DayManager : MonoBehaviour public AudioClip dayClip; public AudioClip nigtClip; + public int daySurvived = 0; + // Start is called before the first frame update void Start() { @@ -31,6 +33,7 @@ public class DayManager : MonoBehaviour { mainSource.PlayOneShot(dayClip); night = false; + daySurvived++; } this.gameObject.transform.Rotate(new Vector3(sunSpeed * Time.deltaTime, 0, 0)); diff --git a/Assets/Scripts/MusicManager.cs.meta b/Assets/Scripts/MusicManager.cs.meta index 49c519f..927ede1 100644 --- a/Assets/Scripts/MusicManager.cs.meta +++ b/Assets/Scripts/MusicManager.cs.meta @@ -1,6 +1,5 @@ fileFormatVersion: 2 -guid: 7b4c3ee9caf3c064988179097d1d6d91 -MonoImporter: +guid: 41e45d644c0cd4b4a8133c39c3ebcfa8 externalObjects: {} serializedVersion: 2 defaultReferences: [] diff --git a/Assets/Scripts/SpawnManager.cs b/Assets/Scripts/SpawnManager.cs index 9da7bf3..2a3a844 100644 --- a/Assets/Scripts/SpawnManager.cs +++ b/Assets/Scripts/SpawnManager.cs @@ -7,9 +7,10 @@ public class SpawnManager : MonoBehaviour public List enemyList = new List(); public List spawnPoints = new List(); - public int enemyNumber = 10; + public int enemyStartNumber = 5; public GameObject Sun = new GameObject(); + bool night = false; bool alreadySpawn = false; @@ -22,6 +23,7 @@ public class SpawnManager : MonoBehaviour // Update is called once per frame void Update() { + int enemyNumber = enemyStartNumber + (Sun.GetComponent().daySurvived * enemyStartNumber); float sunRotationX = Sun.transform.localEulerAngles.x; sunRotationX = (sunRotationX > 180) ? sunRotationX - 360 : sunRotationX; diff --git a/Assets/Scripts/WeaponManager.cs b/Assets/Scripts/WeaponManager.cs index 299b333..5adbdd2 100644 --- a/Assets/Scripts/WeaponManager.cs +++ b/Assets/Scripts/WeaponManager.cs @@ -16,6 +16,9 @@ public class WeaponManager : MonoBehaviour public PlayerManager player; public bool hit = false; + public AudioSource audioSource = new AudioSource(); + public AudioClip shootSound; + // Start is called before the first frame update void Start() { @@ -36,6 +39,7 @@ public class WeaponManager : MonoBehaviour if (particleShoot != null && player.ammo > 1) { GameObject shoot = Instantiate(particleShoot, spawnShoot.transform.position, spawnShoot.transform.rotation); + audioSource.PlayOneShot(shootSound); player.ammo -= 2; Destroy(shoot, 0.3f); fireTime = fireRate + Time.time;