remaining audio tweaks, point stroke smaller, points more jagged

This commit is contained in:
2024-09-28 13:33:44 -05:00
parent 5fb8869a45
commit c2440d8671
7 changed files with 307 additions and 77 deletions

View File

@@ -91,16 +91,19 @@ LineRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_Positions:
- {x: 0, y: 0.739223, z: 0}
- {x: 0.45374674, y: 0.6245288, z: 0}
- {x: 0.84679323, y: 0.27513978, z: 0}
- {x: 0.9386615, y: -0.30498955, z: 0}
- {x: 0.61745495, y: -0.84985405, z: 0}
- {x: -0.000000097632295, y: -1.1167833, z: 0}
- {x: -0.61000687, y: -0.8396027, z: 0}
- {x: -0.96049404, y: -0.31208354, z: 0}
- {x: -0.96166146, y: 0.3124629, z: 0}
- {x: -0.62200487, y: 0.8561161, z: 0}
- {x: 0, y: 0.722425, z: 0}
- {x: 0.42212608, y: 0.80429405, z: 0}
- {x: 0.8367039, y: 0.577535, z: 0}
- {x: 0.99355394, y: 0.120639294, z: 0}
- {x: 0.99157465, y: -0.37605458, z: 0}
- {x: 0.6926372, y: -0.78182584, z: 0}
- {x: 0.27694884, y: -1.1236256, z: 0}
- {x: -0.26369464, y: -1.0698515, z: 0}
- {x: -0.78493685, y: -0.8860107, z: 0}
- {x: -1.1896553, y: -0.45117694, z: 0}
- {x: -1.2224747, y: 0.14843538, z: 0}
- {x: -0.9412302, y: 0.649684, z: 0}
- {x: -0.5474094, y: 1.0430014, z: 0}
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
@@ -204,17 +207,20 @@ PolygonCollider2D:
m_AutoTiling: 0
m_Points:
m_Paths:
- - {x: 0, y: 0.739223}
- {x: 0.45374674, y: 0.6245288}
- {x: 0.84679323, y: 0.27513978}
- {x: 0.9386615, y: -0.30498955}
- {x: 0.61745495, y: -0.84985405}
- {x: -0.000000097632295, y: -1.1167833}
- {x: -0.61000687, y: -0.8396027}
- {x: -0.96049404, y: -0.31208354}
- {x: -0.96166146, y: 0.3124629}
- {x: -0.62200487, y: 0.8561161}
- {x: 0, y: 0.739223}
- - {x: 0, y: 0.722425}
- {x: 0.42212608, y: 0.80429405}
- {x: 0.8367039, y: 0.577535}
- {x: 0.99355394, y: 0.120639294}
- {x: 0.99157465, y: -0.37605458}
- {x: 0.6926372, y: -0.78182584}
- {x: 0.27694884, y: -1.1236256}
- {x: -0.26369464, y: -1.0698515}
- {x: -0.78493685, y: -0.8860107}
- {x: -1.1896553, y: -0.45117694}
- {x: -1.2224747, y: 0.14843538}
- {x: -0.9412302, y: 0.649684}
- {x: -0.5474094, y: 1.0430014}
- {x: 0, y: 0.722425}
m_UseDelaunayMesh: 0
--- !u!50 &7202568895458539576
Rigidbody2D:

View File

@@ -13,6 +13,7 @@ GameObject:
- component: {fileID: -2486798031750081769}
- component: {fileID: 3472295394796250252}
- component: {fileID: 6956043762957484688}
- component: {fileID: 567893918271402583}
m_Layer: 8
m_Name: Player
m_TagString: Player
@@ -231,3 +232,99 @@ Rigidbody2D:
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 6
--- !u!82 &567893918271402583
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3889903327143779179}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 0.384
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

View File

@@ -79,29 +79,28 @@ LineRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_Positions:
- {x: 0, y: 0.1, z: 0}
- {x: 0.02697968, y: 0.09629173, z: 0}
- {x: 0.051958393, y: 0.08544194, z: 0}
- {x: 0.0730836, y: 0.06825531, z: 0}
- {x: 0.088788524, y: 0.0460065, z: 0}
- {x: 0.09790841, y: 0.020345604, z: 0}
- {x: 0.09976687, y: -0.0068242447, z: 0}
- {x: 0.09422609, y: -0.033487957, z: 0}
- {x: 0.08169699, y: -0.057668038, z: 0}
- {x: 0.063108794, y: -0.07757113, z: 0}
- {x: 0.039840113, y: -0.09172113, z: 0}
- {x: 0.013616676, y: -0.0990686, z: 0}
- {x: -0.013616671, y: -0.0990686, z: 0}
- {x: -0.03984011, y: -0.09172113, z: 0}
- {x: -0.063108794, y: -0.07757113, z: 0}
- {x: -0.081697, y: -0.05766802, z: 0}
- {x: -0.09422609, y: -0.033487957, z: 0}
- {x: -0.09976687, y: -0.0068242387, z: 0}
- {x: -0.09790841, y: 0.020345598, z: 0}
- {x: -0.08878853, y: 0.046006497, z: 0}
- {x: -0.0730836, y: 0.068255305, z: 0}
- {x: -0.051958412, y: 0.08544193, z: 0}
- {x: -0.0269797, y: 0.09629172, z: 0}
- {x: 0, y: 0.101423986, z: 0}
- {x: 0.03216264, y: 0.109535895, z: 0}
- {x: 0.059387416, y: 0.092408635, z: 0}
- {x: 0.085814655, y: 0.07435882, z: 0}
- {x: 0.116586685, y: 0.05324336, z: 0}
- {x: 0.12860288, y: 0.018490305, z: 0}
- {x: 0.1177388, y: -0.016928283, z: 0}
- {x: 0.10194865, y: -0.04655839, z: 0}
- {x: 0.09014567, y: -0.07811165, z: 0}
- {x: 0.07209021, y: -0.11217457, z: 0}
- {x: 0.041016683, y: -0.13968995, z: 0}
- {x: -0.000000011974572, y: -0.13697313, z: 0}
- {x: -0.038356, y: -0.13062854, z: 0}
- {x: -0.07716217, y: -0.1200667, z: 0}
- {x: -0.11150521, y: -0.096619815, z: 0}
- {x: -0.11778476, y: -0.05379051, z: 0}
- {x: -0.14035052, y: -0.020179383, z: 0}
- {x: -0.1363941, y: 0.019610537, z: 0}
- {x: -0.113704175, y: 0.05192697, z: 0}
- {x: -0.105317496, y: 0.09125813, z: 0}
- {x: -0.06976721, y: 0.10855988, z: 0}
- {x: -0.03443856, y: 0.11728688, z: 0}
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
@@ -109,8 +108,8 @@ LineRenderer:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0.0046806335
value: 0.047285512
time: 0
value: 0.027296498
inSlope: 0
outSlope: 0
tangentMode: 0
@@ -205,30 +204,29 @@ PolygonCollider2D:
m_AutoTiling: 0
m_Points:
m_Paths:
- - {x: 0, y: 0.1}
- {x: 0.02697968, y: 0.09629173}
- {x: 0.051958393, y: 0.08544194}
- {x: 0.0730836, y: 0.06825531}
- {x: 0.088788524, y: 0.0460065}
- {x: 0.09790841, y: 0.020345604}
- {x: 0.09976687, y: -0.0068242447}
- {x: 0.09422609, y: -0.033487957}
- {x: 0.08169699, y: -0.057668038}
- {x: 0.063108794, y: -0.07757113}
- {x: 0.039840113, y: -0.09172113}
- {x: 0.013616676, y: -0.0990686}
- {x: -0.013616671, y: -0.0990686}
- {x: -0.03984011, y: -0.09172113}
- {x: -0.063108794, y: -0.07757113}
- {x: -0.081697, y: -0.05766802}
- {x: -0.09422609, y: -0.033487957}
- {x: -0.09976687, y: -0.0068242387}
- {x: -0.09790841, y: 0.020345598}
- {x: -0.08878853, y: 0.046006497}
- {x: -0.0730836, y: 0.068255305}
- {x: -0.051958412, y: 0.08544193}
- {x: -0.0269797, y: 0.09629172}
- {x: 0, y: 0.1}
- - {x: 0, y: 0.101423986}
- {x: 0.03216264, y: 0.109535895}
- {x: 0.059387416, y: 0.092408635}
- {x: 0.085814655, y: 0.07435882}
- {x: 0.116586685, y: 0.05324336}
- {x: 0.12860288, y: 0.018490305}
- {x: 0.1177388, y: -0.016928283}
- {x: 0.10194865, y: -0.04655839}
- {x: 0.09014567, y: -0.07811165}
- {x: 0.07209021, y: -0.11217457}
- {x: 0.041016683, y: -0.13968995}
- {x: -0.000000011974572, y: -0.13697313}
- {x: -0.038356, y: -0.13062854}
- {x: -0.07716217, y: -0.1200667}
- {x: -0.11150521, y: -0.096619815}
- {x: -0.11778476, y: -0.05379051}
- {x: -0.14035052, y: -0.020179383}
- {x: -0.1363941, y: 0.019610537}
- {x: -0.113704175, y: 0.05192697}
- {x: -0.105317496, y: 0.09125813}
- {x: -0.06976721, y: 0.10855988}
- {x: -0.03443856, y: 0.11728688}
- {x: 0, y: 0.101423986}
m_UseDelaunayMesh: 0
--- !u!50 &7202568895458539576
Rigidbody2D:
@@ -272,7 +270,7 @@ MonoBehaviour:
color: {r: 0.057498164, g: 0.972549, b: 0.02352939, a: 1}
radius: 0.1
jaggedLow: 0
jaggedHigh: 0
jaggedHigh: 0.072
pointCountLow: 10
pointCountHigh: 30
maxChange: 0.525

View File

@@ -384,6 +384,107 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1054705958 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3889903327143779179, guid: 00fe39f780b615c4da630f6e3b6e9f12, type: 3}
m_PrefabInstance: {fileID: 1645791523}
m_PrefabAsset: {fileID: 0}
--- !u!82 &1054705964
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1054705958}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 0.177
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
--- !u!1 &1378039850
GameObject:
m_ObjectHideFlags: 0
@@ -445,7 +546,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Volume: 0.446
m_Pitch: 1
Loop: 0
Mute: 0
@@ -585,10 +686,14 @@ PrefabInstance:
propertyPath: m_Mass
value: 0.5944103
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 567893918271402583, guid: 00fe39f780b615c4da630f6e3b6e9f12, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 3889903327143779179, guid: 00fe39f780b615c4da630f6e3b6e9f12, type: 3}
insertIndex: -1
addedObject: {fileID: 1054705964}
m_SourcePrefab: {fileID: 100100000, guid: 00fe39f780b615c4da630f6e3b6e9f12, type: 3}
--- !u!1 &2048568119
GameObject:

View File

@@ -12,6 +12,9 @@ public class Asteroid : MonoBehaviour
private void FixedUpdate()
{
if (transform.position.y < -15f)
Destroy(gameObject);
// If asteroids get too slow or stop, begin adding force to correct
if (_rigidbody.velocity.y > -0.1f)
{

View File

@@ -1,5 +1,7 @@
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
public class Player : MonoBehaviour
@@ -7,6 +9,7 @@ public class Player : MonoBehaviour
private LineRenderer _lineRenderer;
private PolygonCollider2D _polygonCollider;
private Rigidbody2D _rigidbody;
private AudioSource _audioSource;
private float _minX;
private float _maxX;
@@ -20,6 +23,7 @@ public class Player : MonoBehaviour
_lineRenderer = GetComponent<LineRenderer>();
_polygonCollider = GetComponent<PolygonCollider2D>();
_rigidbody = GetComponent<Rigidbody2D>();
_audioSource = GetComponent<AudioSource>();
_lineRenderer.material = new Material(Shader.Find("Sprites/Default"));
_lineRenderer.startColor = Color.white;
@@ -31,12 +35,26 @@ public class Player : MonoBehaviour
{
GenerateShape();
StartCoroutine(LoadAudio());
var cam = Camera.main!;
const float inset = 0.05f;
_minX = cam.ScreenToWorldPoint(new Vector3(cam.pixelWidth * inset, 0, cam.nearClipPlane)).x;
_maxX = cam.ScreenToWorldPoint(new Vector3(cam.pixelWidth * (1f - inset), 0, cam.nearClipPlane)).x;
}
private IEnumerator LoadAudio()
{
var assetPath = $"file://{Application.streamingAssetsPath}/Audio/Music";
var www = UnityWebRequestMultimedia.GetAudioClip($"{assetPath}/Neon Doom - Steven O'Brien.mp3", AudioType.MPEG);
yield return www.SendWebRequest();
_audioSource.clip = DownloadHandlerAudioClip.GetContent(www);
_audioSource.loop = true;
_audioSource.Play();
}
private void GenerateShape()
{
var points = new[]
@@ -66,6 +84,9 @@ public class Player : MonoBehaviour
private void FixedUpdate()
{
if (transform.position.y < -15f)
Destroy(gameObject);
_rigidbody.velocity = Vector2.zero;
transform.position += new Vector3(Input.GetAxis("Horizontal") * 0.4f, 0, 0);

View File

@@ -12,8 +12,8 @@ PlayerSettings:
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: midterm-galaga
companyName: UTSA
productName: Galagan
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@@ -139,7 +139,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0
bundleVersion: 1.0
bundleVersion: 0.0.1
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0