SoundGenerator Puzzle Section WIP

Started on the sound generator section of the soundbird puzzle, plus organized folders.
This commit is contained in:
2025-09-22 14:28:01 +02:00
parent 2923ba0851
commit 322bd5377d
29 changed files with 1382 additions and 31 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,169 @@
fileFormatVersion: 2
guid: 5e07c2b448e92b740aa0cedeaec6b17b
TextureImporter:
internalIDToNameTable:
- first:
213: -6472171441532308910
second: HornOnPLACEHOLDER_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: HornOnPLACEHOLDER_0
rect:
serializedVersion: 2
x: 6
y: 52
width: 218
height: 135
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 252f90e6d5a3e26a0800000000000000
internalID: -6472171441532308910
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
HornOnPLACEHOLDER_0: -6472171441532308910
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -1,10 +1,10 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2e6d5c9e1ab5664428bd966573578533 guid: c5858285e4dccc040b7e7c1f7386cb9e
TextureImporter: TextureImporter:
internalIDToNameTable: internalIDToNameTable:
- first: - first:
213: 385901794228357913 213: -7985933250357003947
second: HornPLACEHOLDER_0 second: HornPLACEHOLDER 1_0
externalObjects: {} externalObjects: {}
serializedVersion: 13 serializedVersion: 13
mipmaps: mipmaps:
@@ -126,13 +126,13 @@ TextureImporter:
serializedVersion: 2 serializedVersion: 2
sprites: sprites:
- serializedVersion: 2 - serializedVersion: 2
name: HornPLACEHOLDER_0 name: HornPLACEHOLDER 1_0
rect: rect:
serializedVersion: 2 serializedVersion: 2
x: 7 x: 17
y: 34 y: 47
width: 213 width: 197
height: 167 height: 113
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
@@ -141,8 +141,8 @@ TextureImporter:
physicsShape: [] physicsShape: []
tessellationDetail: -1 tessellationDetail: -1
bones: [] bones: []
spriteID: 91bca2323affa5500800000000000000 spriteID: 5597d7425044c2190800000000000000
internalID: 385901794228357913 internalID: -7985933250357003947
vertices: [] vertices: []
indices: indices:
edges: [] edges: []
@@ -161,7 +161,7 @@ TextureImporter:
spriteCustomMetadata: spriteCustomMetadata:
entries: [] entries: []
nameFileIdTable: nameFileIdTable:
HornPLACEHOLDER_0: 385901794228357913 HornPLACEHOLDER 1_0: -7985933250357003947
mipmapLimitGroupName: mipmapLimitGroupName:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
userData: userData:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2ad6e1dc7d83d164ca43792751384223
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 84222101ff72f434b8e5e49754305f5d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fa5b9c4244ad68a459d1b0dedfae767a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3b3e10c6b8bba8b4483e5fa18d9fdb77
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 975d8d57c80dbbd478eff9545f015f8f
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,53 @@
using UnityEngine;
public class SoundGenerator : MonoBehaviour
{
[SerializeField] private Sprite enterSprite;
[SerializeField] private Sprite exitSprite;
[SerializeField] private AudioClip enterSound;
[SerializeField] private AudioSource audioSource;
private bool playerInside = false;
private SpriteRenderer spriteRenderer;
void Awake()
{
spriteRenderer = GetComponent<SpriteRenderer>();
if (spriteRenderer != null && exitSprite != null)
{
spriteRenderer.sprite = exitSprite; // Set to default on start
}
}
private void OnTriggerEnter2D(Collider2D other)
{
if (!playerInside && other.CompareTag("Player"))
{
playerInside = true;
Debug.Log("Player entered SoundGenerator trigger!");
if (spriteRenderer != null && enterSprite != null)
{
spriteRenderer.sprite = enterSprite;
}
if (audioSource != null && enterSound != null)
{
audioSource.PlayOneShot(enterSound);
}
// Play sound and change animation/state here if needed
}
}
private void OnTriggerExit2D(Collider2D other)
{
if (playerInside && other.CompareTag("Player"))
{
playerInside = false;
Debug.Log("Player exited SoundGenerator trigger!");
if (spriteRenderer != null && exitSprite != null)
{
spriteRenderer.sprite = exitSprite;
}
// Reset animation/state here if needed
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 81336c2157cce7e46ab6ed093c7070c9