Compare commits
74 Commits
10c25d88a4
...
feat/add-j
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0d5fccc37 | ||
|
|
faf2f92521 | ||
|
|
ffa489db0d | ||
|
|
53fd617abe | ||
|
|
64b2d63799 | ||
|
|
f42463176f | ||
|
|
ab434be65f | ||
|
|
935b4c089a | ||
|
|
bf80659d7b | ||
|
|
4f19d135df | ||
|
|
7d7b288b4f | ||
|
|
e1d520e9fb | ||
|
|
efea27a503 | ||
|
|
4c9436ae74 | ||
|
|
0892ac9de3 | ||
|
|
18a12a11a5 | ||
|
|
7daba4cb56 | ||
|
|
46c1094b7f | ||
|
|
43792c347e | ||
|
|
ee621dfc24 | ||
|
|
09acac00c7 | ||
|
|
e506bce879 | ||
|
|
08b051de1c | ||
|
|
8ed3a97669 | ||
|
|
4d5af9b60f | ||
|
|
66a8ca6e49 | ||
|
|
fb76786cf9 | ||
|
|
a28f6287be | ||
|
|
c3c487999d | ||
| 7a281dcb6c | |||
|
|
a9314979ad | ||
|
|
1dbc2734f3 | ||
|
|
67a1717b86 | ||
|
|
eee022fa5f | ||
|
|
bf59556985 | ||
|
|
4593b3714c | ||
|
|
530e9e0bd2 | ||
|
|
47dc0b3886 | ||
|
|
e92cbe1f4b | ||
|
|
421df26822 | ||
|
|
467dabc2f6 | ||
|
|
f4137c8b04 | ||
|
|
ffe6d73a50 | ||
|
|
303866fa6d | ||
|
|
30085123c2 | ||
|
|
e6bd28ec1c | ||
|
|
a7320b5ec6 | ||
|
|
fb9e02efd6 | ||
|
|
d7474f6d4a | ||
|
|
fbdfe808cc | ||
|
|
3f69369438 | ||
|
|
4c6c87f0b3 | ||
|
|
94e44ad7af | ||
|
|
8c4c2b372b | ||
|
|
b418333d67 | ||
|
|
6dd1c5efb8 | ||
|
|
4b4066fbcc | ||
|
|
55f71245b5 | ||
|
|
4c6f8f0768 | ||
|
|
c20993a512 | ||
|
|
4a3811f72e | ||
|
|
da530e2083 | ||
|
|
f8ef2c1c0e | ||
| e07fb7dc4b | |||
|
|
69518ab9a0 | ||
|
|
e54cd1b318 | ||
|
|
a86c709f7c | ||
|
|
e9ee111bce | ||
|
|
08d14c3ed3 | ||
|
|
cf523f77ec | ||
|
|
ecb2a911f3 | ||
|
|
322f8d1986 | ||
|
|
959a4988bc | ||
|
|
b568e547d1 |
8
AGENTS.md
Normal file
8
AGENTS.md
Normal file
@@ -0,0 +1,8 @@
|
||||
<!-- UNITY CODE ASSIST INSTRUCTIONS START -->
|
||||
- Project name: HeadlessHazard
|
||||
- Unity version: Unity 6000.3.10f1
|
||||
- Active game object:
|
||||
- Name: Button_3
|
||||
- Tag: Untagged
|
||||
- Layer: Default
|
||||
<!-- UNITY CODE ASSIST INSTRUCTIONS END -->
|
||||
8
Assets/Art/Image.meta
Normal file
8
Assets/Art/Image.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5bfad85b20c9eab4e8cdaf4afc258b3b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Image/Antoine.jpg
Normal file
BIN
Assets/Art/Image/Antoine.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
117
Assets/Art/Image/Antoine.jpg.meta
Normal file
117
Assets/Art/Image/Antoine.jpg.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f44f322e7863f3f4ba77cd4ad37e90bc
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Image/Clement.jpg
Normal file
BIN
Assets/Art/Image/Clement.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
117
Assets/Art/Image/Clement.jpg.meta
Normal file
117
Assets/Art/Image/Clement.jpg.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 389e71f3d946b6e4383c046d3a615b59
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Image/Dany.png
Normal file
BIN
Assets/Art/Image/Dany.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
117
Assets/Art/Image/Dany.png.meta
Normal file
117
Assets/Art/Image/Dany.png.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 028264f6bf548d84ea9c180aa65dfab4
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Image/Thibault.jpg
Normal file
BIN
Assets/Art/Image/Thibault.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 MiB |
117
Assets/Art/Image/Thibault.jpg.meta
Normal file
117
Assets/Art/Image/Thibault.jpg.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64c3032bd5ea939499d2fdff0e7b2c68
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Image/Timote.jpg
Normal file
BIN
Assets/Art/Image/Timote.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
117
Assets/Art/Image/Timote.jpg.meta
Normal file
117
Assets/Art/Image/Timote.jpg.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91af048793b902f4a8985bc530c3a37a
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Image/pierre.jpeg
Normal file
BIN
Assets/Art/Image/pierre.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 MiB |
117
Assets/Art/Image/pierre.jpeg.meta
Normal file
117
Assets/Art/Image/pierre.jpeg.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6547a8bbee6f454694b64d2c2daa939
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
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: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
137
Assets/Art/Materials/Base.mat
Normal file
137
Assets/Art/Materials/Base.mat
Normal file
@@ -0,0 +1,137 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-7382003762351373957
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
8
Assets/Art/Materials/Base.mat.meta
Normal file
8
Assets/Art/Materials/Base.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1a257a00e51547a6be8f795bcdf5cae
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 35ab53bef1f1a954cb756b2878e66c59, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 4cbf6265c6e95644a98b9801ad67e18d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -63,7 +63,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 7445403625d6a2a41b2a8862e711959c, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 423391cbbe5ecd94b94ef01cc234a46d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: edbd1f26a74da8f45b34d7a07d5aac22, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 682dde2b3012d924bb7ea8e62e07f935, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 38fbec325fe791149aceb45cb8d1fe8a, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -63,7 +63,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: b4378bd152ed6824a90c459d6b625a2d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -63,7 +63,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 3fd20171da7bd6548b4c7f5f826ad9f9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -63,7 +63,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: e61c1e60462c13c4c8b36bbe95814ae5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -63,7 +63,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 9d75e9f07b95b04489b58dab513a8e47, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -63,7 +63,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 7aec87028f70b254eba685a7e74b5b0b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 1763c27db58e0514aae9cc0bb4116dff, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 35ab53bef1f1a954cb756b2878e66c59, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 4cbf6265c6e95644a98b9801ad67e18d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 7445403625d6a2a41b2a8862e711959c, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -52,7 +52,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 423391cbbe5ecd94b94ef01cc234a46d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -52,7 +52,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: edbd1f26a74da8f45b34d7a07d5aac22, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 682dde2b3012d924bb7ea8e62e07f935, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 38fbec325fe791149aceb45cb8d1fe8a, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: b4378bd152ed6824a90c459d6b625a2d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -52,7 +52,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 3fd20171da7bd6548b4c7f5f826ad9f9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: e61c1e60462c13c4c8b36bbe95814ae5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -52,7 +52,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 9d75e9f07b95b04489b58dab513a8e47, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 7aec87028f70b254eba685a7e74b5b0b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 1763c27db58e0514aae9cc0bb4116dff, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -52,7 +52,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: a40fa2693b59eae42afc9eed3e10b3fd, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -52,7 +52,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: a40fa2693b59eae42afc9eed3e10b3fd, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: a40fa2693b59eae42afc9eed3e10b3fd, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -65,7 +65,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: a40fa2693b59eae42afc9eed3e10b3fd, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
143
Assets/Art/Materials/DevTex/Materials/Dev_trans_grey.mat
Normal file
143
Assets/Art/Materials/DevTex/Materials/Dev_trans_grey.mat
Normal file
@@ -0,0 +1,143 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Dev_trans_grey
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHAPREMULTIPLY_ON
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 423391cbbe5ecd94b94ef01cc234a46d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 423391cbbe5ecd94b94ef01cc234a46d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 10
|
||||
- _DstBlendAlpha: 10
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 1
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.4745098}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.4745098}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2556394321436131706
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2ff028127aed49898d5db254c679ffa
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -39,6 +39,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -68,7 +69,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 824f945e571a5174aaa9703ee1d360d3, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -38,6 +38,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -67,7 +68,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 798ec416011b72942b1b4694cbc14eff, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -39,6 +39,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -68,7 +69,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: cfd85ceaefb8600438a4aeb6589031ce, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -39,6 +39,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -68,7 +69,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: bac4909bc8316f64d847112aa1c59e61, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -55,7 +56,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: b6181935a2534ff47bc4b0f67c13bf9d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -39,6 +39,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -68,7 +69,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 0f81f560420ee5643a5b9a974717975f, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -55,7 +56,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 9eb5136048cda804c99fc3f7837f3bb2, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -39,6 +39,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -68,7 +69,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 40f424e731fca594598a90b3a14c4114, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -39,6 +39,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -68,7 +69,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: aec01169946eb05479435d4ce5f980ae, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -55,7 +56,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 8c206ac34833eed4f8c6ff447fd23840, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -55,7 +56,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: aa6fb989189ddee4b8127e71c11ae661, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -55,7 +56,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 0282a7324c0d39b4986149a1a97255ea, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -27,6 +27,7 @@ Material:
|
||||
m_ValidKeywords:
|
||||
- _ALPHAPREMULTIPLY_ON
|
||||
- _EMISSION
|
||||
- _ENVIRONMENTREFLECTIONS_OFF
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
m_InvalidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
@@ -40,6 +41,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -69,7 +71,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 0f23691f2fdd342419ac3d41c7e91734, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -55,7 +56,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 4b2ec62d304149344ae135e6ba287be6, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -27,6 +27,7 @@ Material:
|
||||
m_ValidKeywords:
|
||||
- _ALPHAPREMULTIPLY_ON
|
||||
- _EMISSION
|
||||
- _ENVIRONMENTREFLECTIONS_OFF
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
m_InvalidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
@@ -40,6 +41,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -69,7 +71,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 51f3b8ff19a42d3489663fb2f20a5737, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -55,7 +56,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 937f9b5e06b17da498d852983fcfbc09, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
@@ -39,6 +39,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -68,7 +69,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 8da392347537b7649879a4e7e5b02ebd, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
141
Assets/Art/Materials/Player/Trajectory Material.mat
Normal file
141
Assets/Art/Materials/Player/Trajectory Material.mat
Normal file
@@ -0,0 +1,141 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-4017841189937380044
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Trajectory Material
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 0
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 10
|
||||
- _DstBlendAlpha: 10
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 5
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 1
|
||||
- _WorkflowMode: 0
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 0, b: 0, a: 0.6862745}
|
||||
- _Color: {r: 1, g: 0, b: 0, a: 0.6862745}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
8
Assets/Art/Materials/Player/Trajectory Material.mat.meta
Normal file
8
Assets/Art/Materials/Player/Trajectory Material.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51588d9f6325eb54eaa0c67389672860
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Art/Models/Level.meta
Normal file
8
Assets/Art/Models/Level.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c06cd160cc1ea554b8ba343bd3b83845
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Code/Scripts/DevRoom.meta
Normal file
8
Assets/Code/Scripts/DevRoom.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4bfa7e49bca4e0439e2c2c04bd801fe
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
90
Assets/Code/Scripts/DevRoom/DevRoomHUD.cs
Normal file
90
Assets/Code/Scripts/DevRoom/DevRoomHUD.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Displays a controls legend in the top-left corner of the screen.
|
||||
/// Attach to any active GameObject in the DevRoom scene.
|
||||
/// </summary>
|
||||
public class DevRoomHUD : MonoBehaviour
|
||||
{
|
||||
[Header("Layout")]
|
||||
[SerializeField] private float paddingX = 16f;
|
||||
[SerializeField] private float paddingY = 16f;
|
||||
[SerializeField] private float lineHeight = 22f;
|
||||
[SerializeField] private int fontSize = 14;
|
||||
|
||||
[Header("Style")]
|
||||
[SerializeField] private Color backgroundColor = new Color(0f, 0f, 0f, 0.55f);
|
||||
[SerializeField] private Color keyColor = new Color(1f, 0.85f, 0.2f);
|
||||
[SerializeField] private Color labelColor = Color.white;
|
||||
|
||||
private static readonly (string key, string action)[] k_Controls =
|
||||
{
|
||||
("WASD / Arrows", "Move"),
|
||||
("Mouse", "Look"),
|
||||
("Space", "Jump"),
|
||||
("Left Shift", "Sprint"),
|
||||
("C", "Crouch"),
|
||||
("LMB", "Throw head"),
|
||||
("E (hold)", "Retrieve head"),
|
||||
("1 / 2", "Previous / Next"),
|
||||
};
|
||||
|
||||
private GUIStyle m_keyStyle;
|
||||
private GUIStyle m_labelStyle;
|
||||
private GUIStyle m_boxStyle;
|
||||
private Texture2D m_bgTexture;
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EnsureStyles();
|
||||
|
||||
float keyColWidth = 110f;
|
||||
float labelColWidth = 130f;
|
||||
float totalWidth = paddingX * 2 + keyColWidth + 8f + labelColWidth;
|
||||
float totalHeight = paddingY * 2 + k_Controls.Length * lineHeight;
|
||||
|
||||
Rect bgRect = new Rect(8f, 8f, totalWidth, totalHeight);
|
||||
GUI.DrawTexture(bgRect, m_bgTexture);
|
||||
|
||||
float x = bgRect.x + paddingX;
|
||||
float y = bgRect.y + paddingY;
|
||||
|
||||
for (int i = 0; i < k_Controls.Length; i++)
|
||||
{
|
||||
float rowY = y + i * lineHeight;
|
||||
|
||||
GUI.Label(new Rect(x, rowY, keyColWidth, lineHeight), k_Controls[i].key, m_keyStyle);
|
||||
GUI.Label(new Rect(x + keyColWidth + 8f, rowY, labelColWidth, lineHeight), k_Controls[i].action, m_labelStyle);
|
||||
}
|
||||
}
|
||||
|
||||
private void EnsureStyles()
|
||||
{
|
||||
if (m_keyStyle != null)
|
||||
return;
|
||||
|
||||
m_bgTexture = new Texture2D(1, 1);
|
||||
m_bgTexture.SetPixel(0, 0, backgroundColor);
|
||||
m_bgTexture.Apply();
|
||||
|
||||
m_keyStyle = new GUIStyle(GUI.skin.label)
|
||||
{
|
||||
fontSize = fontSize,
|
||||
fontStyle = FontStyle.Bold,
|
||||
};
|
||||
m_keyStyle.normal.textColor = keyColor;
|
||||
|
||||
m_labelStyle = new GUIStyle(GUI.skin.label)
|
||||
{
|
||||
fontSize = fontSize,
|
||||
fontStyle = FontStyle.Normal,
|
||||
};
|
||||
m_labelStyle.normal.textColor = labelColor;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (m_bgTexture != null)
|
||||
Destroy(m_bgTexture);
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Scripts/DevRoom/DevRoomHUD.cs.meta
Normal file
2
Assets/Code/Scripts/DevRoom/DevRoomHUD.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c34284eb72c0cc841b21e6425e27606a
|
||||
189
Assets/Code/Scripts/Interaction/ButtonSequenceDoorPuzzle.cs
Normal file
189
Assets/Code/Scripts/Interaction/ButtonSequenceDoorPuzzle.cs
Normal file
@@ -0,0 +1,189 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class ButtonSequenceDoorPuzzle : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
[Tooltip("All available buttons for this puzzle.")]
|
||||
[SerializeField] private WallInteractButton[] buttons;
|
||||
|
||||
[Tooltip("Door to open when the sequence is correct.")]
|
||||
[SerializeField] private SlidingDoor targetDoor;
|
||||
|
||||
[Tooltip("Optional blocks controlled by this puzzle (reset with SetOff on start/wrong input).")]
|
||||
[SerializeField] private TestBlock[] puzzleBlocks;
|
||||
|
||||
[Header("Sequence")]
|
||||
[Tooltip("Button indices (from the buttons array) that must be pressed in order. Example: 2,0,3")]
|
||||
[SerializeField] private int[] requiredSequence = { 0, 1, 2 };
|
||||
|
||||
[Tooltip("If true, wrong input resets progress back to 0.")]
|
||||
[SerializeField] private bool resetOnWrongPress = true;
|
||||
|
||||
[Tooltip("If true, puzzle can only be solved once.")]
|
||||
[SerializeField] private bool lockAfterSolved = true;
|
||||
|
||||
[Header("Debug")]
|
||||
[SerializeField] private bool enableDebugLogs = true;
|
||||
|
||||
private int m_progress;
|
||||
private bool m_isSolved;
|
||||
private UnityAction[] m_cachedListeners;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
SetAllBlocksOff();
|
||||
RegisterAllButtons();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
UnregisterAllButtons();
|
||||
}
|
||||
|
||||
private void RegisterAllButtons()
|
||||
{
|
||||
if (buttons == null)
|
||||
return;
|
||||
|
||||
m_cachedListeners = new UnityAction[buttons.Length];
|
||||
|
||||
for (int i = 0; i < buttons.Length; i++)
|
||||
{
|
||||
WallInteractButton button = buttons[i];
|
||||
if (button == null)
|
||||
continue;
|
||||
|
||||
int buttonIndex = i;
|
||||
UnityAction action = () => OnButtonPressed(buttonIndex);
|
||||
m_cachedListeners[i] = action;
|
||||
button.OnInteract.AddListener(action);
|
||||
}
|
||||
}
|
||||
|
||||
private void UnregisterAllButtons()
|
||||
{
|
||||
if (buttons == null)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < buttons.Length; i++)
|
||||
{
|
||||
WallInteractButton button = buttons[i];
|
||||
if (button == null)
|
||||
continue;
|
||||
|
||||
if (m_cachedListeners != null && i < m_cachedListeners.Length && m_cachedListeners[i] != null)
|
||||
button.OnInteract.RemoveListener(m_cachedListeners[i]);
|
||||
}
|
||||
|
||||
m_cachedListeners = null;
|
||||
m_progress = 0;
|
||||
}
|
||||
|
||||
private void OnButtonPressed(int buttonIndex)
|
||||
{
|
||||
Log($"Button pressed: index {buttonIndex}");
|
||||
|
||||
if (m_isSolved && lockAfterSolved)
|
||||
{
|
||||
Log("Puzzle already solved and locked.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsSequenceValid())
|
||||
{
|
||||
Log("Invalid sequence configuration.");
|
||||
return;
|
||||
}
|
||||
|
||||
int expectedIndex = requiredSequence[m_progress];
|
||||
Log($"Expected button index: {expectedIndex} (step {m_progress + 1}/{requiredSequence.Length})");
|
||||
|
||||
if (buttonIndex == expectedIndex)
|
||||
{
|
||||
m_progress++;
|
||||
Log($"Correct input. Progress: {m_progress}/{requiredSequence.Length}");
|
||||
|
||||
if (m_progress >= requiredSequence.Length)
|
||||
{
|
||||
SolvePuzzle();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (resetOnWrongPress)
|
||||
{
|
||||
Log("Wrong input. Resetting sequence and turning puzzle blocks OFF.");
|
||||
m_progress = 0;
|
||||
SetAllBlocksOff();
|
||||
return;
|
||||
}
|
||||
|
||||
Log("Wrong input, but resetOnWrongPress is disabled.");
|
||||
}
|
||||
|
||||
private bool IsSequenceValid()
|
||||
{
|
||||
if (requiredSequence == null || requiredSequence.Length == 0)
|
||||
return false;
|
||||
|
||||
if (buttons == null || buttons.Length == 0)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < requiredSequence.Length; i++)
|
||||
{
|
||||
int index = requiredSequence[i];
|
||||
if (index < 0 || index >= buttons.Length)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void SolvePuzzle()
|
||||
{
|
||||
m_isSolved = true;
|
||||
m_progress = 0;
|
||||
Log("Sequence completed. Opening door.");
|
||||
|
||||
if (targetDoor != null)
|
||||
targetDoor.Open();
|
||||
}
|
||||
|
||||
private void SetAllBlocksOff()
|
||||
{
|
||||
if (puzzleBlocks == null)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < puzzleBlocks.Length; i++)
|
||||
{
|
||||
if (puzzleBlocks[i] == null)
|
||||
continue;
|
||||
|
||||
puzzleBlocks[i].SetOff();
|
||||
}
|
||||
}
|
||||
|
||||
private void Log(string message)
|
||||
{
|
||||
if (!enableDebugLogs)
|
||||
return;
|
||||
|
||||
Debug.Log($"[{nameof(ButtonSequenceDoorPuzzle)}] {message}", this);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnValidate()
|
||||
{
|
||||
if (requiredSequence == null)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < requiredSequence.Length; i++)
|
||||
{
|
||||
requiredSequence[i] = Math.Max(0, requiredSequence[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 920802292ba9a49d2bee3519a905717d
|
||||
114
Assets/Code/Scripts/Interaction/SlidingDoor.cs
Normal file
114
Assets/Code/Scripts/Interaction/SlidingDoor.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class SlidingDoor : MonoBehaviour
|
||||
{
|
||||
public enum SlideAxis { X, Y, Z }
|
||||
public enum SlideDirection { Positive = 1, Negative = -1 }
|
||||
|
||||
[Header("Slide Settings")]
|
||||
[Tooltip("Local axis the door slides along.")]
|
||||
[SerializeField] private SlideAxis axis = SlideAxis.X;
|
||||
|
||||
[Tooltip("Which way along the axis the door opens.")]
|
||||
[SerializeField] private SlideDirection direction = SlideDirection.Positive;
|
||||
|
||||
[Tooltip("How far the door travels when fully open.")]
|
||||
[SerializeField] private float slideDistance = 2f;
|
||||
|
||||
[Tooltip("Movement speed (units per second).")]
|
||||
[SerializeField] private float speed = 3f;
|
||||
|
||||
[Header("Start State")]
|
||||
[SerializeField] private bool startOpen = false;
|
||||
|
||||
[Header("Events")]
|
||||
public UnityEvent OnOpened;
|
||||
public UnityEvent OnClosed;
|
||||
|
||||
private Vector3 m_closedPos;
|
||||
private Vector3 m_openPos;
|
||||
private Vector3 m_targetPos;
|
||||
private bool m_isOpen;
|
||||
private bool m_eventFiredOpen;
|
||||
private bool m_eventFiredClosed;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
m_closedPos = transform.localPosition;
|
||||
m_openPos = m_closedPos + GetSlideVector() * slideDistance;
|
||||
|
||||
if (startOpen)
|
||||
{
|
||||
transform.localPosition = m_openPos;
|
||||
m_isOpen = true;
|
||||
}
|
||||
|
||||
m_targetPos = m_isOpen ? m_openPos : m_closedPos;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
transform.localPosition = Vector3.MoveTowards(
|
||||
transform.localPosition, m_targetPos, speed * Time.deltaTime);
|
||||
|
||||
if (Vector3.Distance(transform.localPosition, m_openPos) < 0.01f && !m_eventFiredOpen)
|
||||
{
|
||||
m_eventFiredOpen = true;
|
||||
m_eventFiredClosed = false;
|
||||
OnOpened?.Invoke();
|
||||
}
|
||||
else if (Vector3.Distance(transform.localPosition, m_closedPos) < 0.01f && !m_eventFiredClosed)
|
||||
{
|
||||
m_eventFiredClosed = true;
|
||||
m_eventFiredOpen = false;
|
||||
OnClosed?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public void Open()
|
||||
{
|
||||
m_isOpen = true;
|
||||
m_targetPos = m_openPos;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
m_isOpen = false;
|
||||
m_targetPos = m_closedPos;
|
||||
}
|
||||
|
||||
public void Toggle()
|
||||
{
|
||||
if (m_isOpen)
|
||||
Close();
|
||||
else
|
||||
Open();
|
||||
}
|
||||
|
||||
private Vector3 GetSlideVector()
|
||||
{
|
||||
float sign = (float)direction;
|
||||
return axis switch
|
||||
{
|
||||
SlideAxis.X => new Vector3(sign, 0f, 0f),
|
||||
SlideAxis.Y => new Vector3(0f, sign, 0f),
|
||||
SlideAxis.Z => new Vector3(0f, 0f, sign),
|
||||
_ => Vector3.right,
|
||||
};
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnDrawGizmos()
|
||||
{
|
||||
Vector3 worldClosed = transform.parent != null
|
||||
? transform.parent.TransformPoint(transform.localPosition)
|
||||
: transform.position;
|
||||
|
||||
Vector3 slideVec = transform.TransformDirection(GetSlideVector()) * slideDistance;
|
||||
Gizmos.color = Color.cyan;
|
||||
Gizmos.DrawLine(worldClosed, worldClosed + slideVec);
|
||||
Gizmos.DrawWireSphere(worldClosed + slideVec, 0.08f);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
2
Assets/Code/Scripts/Interaction/SlidingDoor.cs.meta
Normal file
2
Assets/Code/Scripts/Interaction/SlidingDoor.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cc6c36a261296f4c82e315da147ba93
|
||||
@@ -1,4 +1,3 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.InputSystem;
|
||||
@@ -7,23 +6,33 @@ using UnityEngine.InputSystem;
|
||||
public class WallInteractButton : MonoBehaviour
|
||||
{
|
||||
[Header("Interaction")]
|
||||
[Tooltip("Optional Input Action. If empty, fallback key will be used.")]
|
||||
[SerializeField] private InputActionReference interactAction;
|
||||
|
||||
[Tooltip("Used only if no Input Action is assigned.")]
|
||||
[SerializeField] private Key fallbackKey = Key.E;
|
||||
[Tooltip("Key the player must press to interact (keyboard fallback).")]
|
||||
[SerializeField] private Key interactKey = Key.E;
|
||||
|
||||
[Tooltip("If true, the button can only be triggered once.")]
|
||||
[SerializeField] private bool oneShot = false;
|
||||
|
||||
[Header("Prompt")]
|
||||
[SerializeField] private TMP_Text promptText;
|
||||
[SerializeField] private string promptMessage = "Press E to interact";
|
||||
[Header("Physical Press")]
|
||||
[Tooltip("Transform that moves to simulate a physical press (optional).")]
|
||||
[SerializeField] private Transform buttonMesh;
|
||||
|
||||
[Tooltip("How far the button moves when pressed.")]
|
||||
[SerializeField] private float pressDepth = 0.05f;
|
||||
|
||||
[Tooltip("Speed of the press/release animation.")]
|
||||
[SerializeField] private float pressSpeed = 10f;
|
||||
|
||||
[Header("Events")]
|
||||
public UnityEvent OnInteract;
|
||||
|
||||
private bool m_playerInRange;
|
||||
private bool m_hasInteracted;
|
||||
private bool m_used;
|
||||
|
||||
private Vector3 m_buttonRestPos;
|
||||
private Vector3 m_buttonPressedPos;
|
||||
private bool m_isVisuallyPressed;
|
||||
|
||||
public PlayerHeadController headController;
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
@@ -31,79 +40,99 @@ public class WallInteractButton : MonoBehaviour
|
||||
col.isTrigger = true;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (interactAction != null)
|
||||
{
|
||||
interactAction.action.Enable();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (interactAction != null)
|
||||
{
|
||||
interactAction.action.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
UpdatePrompt(false);
|
||||
if (buttonMesh != null)
|
||||
{
|
||||
m_buttonRestPos = buttonMesh.localPosition;
|
||||
m_buttonPressedPos = m_buttonRestPos - buttonMesh.localRotation * Vector3.forward * pressDepth;
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!m_playerInRange)
|
||||
return;
|
||||
|
||||
if (oneShot && m_hasInteracted)
|
||||
return;
|
||||
|
||||
if (WasInteractPressed())
|
||||
if (!headController.isHoldingHead && m_playerInRange && Keyboard.current != null && Keyboard.current[interactKey].wasPressedThisFrame)
|
||||
{
|
||||
m_hasInteracted = true;
|
||||
OnInteract?.Invoke();
|
||||
TryInteract();
|
||||
}
|
||||
|
||||
AnimateButton();
|
||||
}
|
||||
|
||||
private void TryInteract()
|
||||
{
|
||||
if (oneShot && m_used)
|
||||
return;
|
||||
|
||||
m_used = true;
|
||||
m_isVisuallyPressed = true;
|
||||
OnInteract?.Invoke();
|
||||
|
||||
if (!oneShot)
|
||||
Invoke(nameof(ReleaseVisual), 0.15f);
|
||||
}
|
||||
|
||||
private void ReleaseVisual()
|
||||
{
|
||||
m_isVisuallyPressed = false;
|
||||
}
|
||||
|
||||
private void AnimateButton()
|
||||
{
|
||||
if (buttonMesh == null)
|
||||
return;
|
||||
|
||||
Vector3 target = m_isVisuallyPressed ? m_buttonPressedPos : m_buttonRestPos;
|
||||
buttonMesh.localPosition = Vector3.Lerp(buttonMesh.localPosition, target, Time.deltaTime * pressSpeed);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (!IsPlayer(other))
|
||||
return;
|
||||
|
||||
if (IsPlayer(other))
|
||||
m_playerInRange = true;
|
||||
UpdatePrompt(true);
|
||||
}
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (!IsPlayer(other))
|
||||
return;
|
||||
|
||||
if (IsPlayer(other))
|
||||
m_playerInRange = false;
|
||||
UpdatePrompt(false);
|
||||
}
|
||||
|
||||
private bool WasInteractPressed()
|
||||
{
|
||||
if (interactAction != null)
|
||||
return interactAction.action.WasPressedThisFrame() || interactAction.action.WasPerformedThisFrame();
|
||||
|
||||
return Keyboard.current != null && Keyboard.current[fallbackKey].wasPressedThisFrame;
|
||||
}
|
||||
|
||||
private bool IsPlayer(Collider other)
|
||||
{
|
||||
return other.CompareTag("Player") || other.GetComponentInParent<PlayerMovement>() != null;
|
||||
if (other.CompareTag("Player"))
|
||||
return true;
|
||||
|
||||
if (other.GetComponentInParent<PlayerMovement>() != null)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void UpdatePrompt(bool visible)
|
||||
#if UNITY_EDITOR
|
||||
private void OnDrawGizmos()
|
||||
{
|
||||
if (promptText == null)
|
||||
Collider col = GetComponent<Collider>();
|
||||
if (col == null)
|
||||
return;
|
||||
|
||||
promptText.text = promptMessage;
|
||||
promptText.gameObject.SetActive(visible);
|
||||
Gizmos.matrix = transform.localToWorldMatrix;
|
||||
Gizmos.color = m_playerInRange
|
||||
? new Color(0f, 1f, 0f, 0.25f)
|
||||
: new Color(1f, 0.9f, 0f, 0.15f);
|
||||
|
||||
if (col is SphereCollider sphere)
|
||||
{
|
||||
Gizmos.DrawSphere(sphere.center, sphere.radius);
|
||||
Gizmos.color = m_playerInRange ? Color.green : Color.yellow;
|
||||
Gizmos.DrawWireSphere(sphere.center, sphere.radius);
|
||||
}
|
||||
else if (col is BoxCollider box)
|
||||
{
|
||||
Gizmos.DrawCube(box.center, box.size);
|
||||
Gizmos.color = m_playerInRange ? Color.green : Color.yellow;
|
||||
Gizmos.DrawWireCube(box.center, box.size);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
8
Assets/Code/Scripts/Level.meta
Normal file
8
Assets/Code/Scripts/Level.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e7b9c54377674993a7922f84e9cfcce
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
262
Assets/Code/Scripts/Level/SubtitleSequencePlayer.cs
Normal file
262
Assets/Code/Scripts/Level/SubtitleSequencePlayer.cs
Normal file
@@ -0,0 +1,262 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Reusable subtitle player that renders and plays subtitle lines loaded from JSON.
|
||||
/// </summary>
|
||||
public class SubtitleSequencePlayer : MonoBehaviour
|
||||
{
|
||||
[Serializable]
|
||||
private struct SubtitleLine
|
||||
{
|
||||
public string speaker;
|
||||
public string text;
|
||||
public float duration;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
private struct SubtitleFile
|
||||
{
|
||||
public SubtitleLine[] lines;
|
||||
}
|
||||
|
||||
[Header("Optional Default Data")]
|
||||
[Tooltip("Used only if trigger zone calls PlayDefault().")]
|
||||
[SerializeField] private TextAsset defaultSubtitleJson;
|
||||
|
||||
[SerializeField] private float typewriterCharsPerSecond = 40f;
|
||||
[SerializeField] private float fadeDuration = 0.2f;
|
||||
[SerializeField] private float gapBetweenLines = 0.15f;
|
||||
|
||||
[Header("Visual")]
|
||||
[SerializeField] private int fontSize = 28;
|
||||
[SerializeField] private int speakerFontSize = 18;
|
||||
[SerializeField] private float horizontalPadding = 28f;
|
||||
[SerializeField] private float bottomOffset = 56f;
|
||||
[SerializeField] private Color textColor = new Color(1f, 1f, 1f, 1f);
|
||||
[SerializeField] private Color speakerColor = new Color(1f, 0.85f, 0.35f, 1f);
|
||||
[SerializeField] private Color backgroundColor = new Color(0f, 0f, 0f, 0.62f);
|
||||
|
||||
private string m_currentSpeaker;
|
||||
private string m_currentText;
|
||||
private GUIStyle m_textStyle;
|
||||
private GUIStyle m_speakerStyle;
|
||||
private Texture2D m_background;
|
||||
private bool m_isShowing;
|
||||
private bool m_isPlaying;
|
||||
private float m_alpha;
|
||||
private SubtitleLine[] m_runtimeLines = Array.Empty<SubtitleLine>();
|
||||
|
||||
public bool IsPlaying => m_isPlaying;
|
||||
|
||||
public bool TryPlay(TextAsset subtitleJson, float initialDelay = 0f)
|
||||
{
|
||||
if (m_isPlaying)
|
||||
return false;
|
||||
|
||||
if (!TryReadLinesFromJson(subtitleJson, out SubtitleLine[] parsedLines))
|
||||
return false;
|
||||
|
||||
m_runtimeLines = parsedLines;
|
||||
StartCoroutine(PlaySequence(initialDelay));
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool PlayDefault(float initialDelay = 0f)
|
||||
{
|
||||
return TryPlay(defaultSubtitleJson, initialDelay);
|
||||
}
|
||||
|
||||
private IEnumerator PlaySequence(float initialDelay)
|
||||
{
|
||||
m_isPlaying = true;
|
||||
|
||||
if (m_runtimeLines == null || m_runtimeLines.Length == 0)
|
||||
{
|
||||
m_isPlaying = false;
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (initialDelay > 0f)
|
||||
yield return new WaitForSeconds(initialDelay);
|
||||
|
||||
for (int i = 0; i < m_runtimeLines.Length; i++)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(m_runtimeLines[i].text) || m_runtimeLines[i].duration <= 0f)
|
||||
continue;
|
||||
|
||||
yield return StartCoroutine(ShowLine(m_runtimeLines[i]));
|
||||
|
||||
if (gapBetweenLines > 0f)
|
||||
yield return new WaitForSeconds(gapBetweenLines);
|
||||
}
|
||||
|
||||
m_currentSpeaker = string.Empty;
|
||||
m_currentText = string.Empty;
|
||||
m_isPlaying = false;
|
||||
}
|
||||
|
||||
private bool TryReadLinesFromJson(TextAsset subtitleJson, out SubtitleLine[] parsedLines)
|
||||
{
|
||||
parsedLines = Array.Empty<SubtitleLine>();
|
||||
|
||||
if (subtitleJson == null || string.IsNullOrWhiteSpace(subtitleJson.text))
|
||||
return false;
|
||||
|
||||
SubtitleFile file;
|
||||
try
|
||||
{
|
||||
file = JsonUtility.FromJson<SubtitleFile>(subtitleJson.text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (file.lines == null || file.lines.Length == 0)
|
||||
return false;
|
||||
|
||||
parsedLines = file.lines;
|
||||
return true;
|
||||
}
|
||||
|
||||
private IEnumerator ShowLine(SubtitleLine line)
|
||||
{
|
||||
m_currentSpeaker = line.speaker;
|
||||
m_currentText = string.Empty;
|
||||
m_isShowing = true;
|
||||
|
||||
if (fadeDuration > 0f)
|
||||
{
|
||||
float fadeIn = 0f;
|
||||
while (fadeIn < fadeDuration)
|
||||
{
|
||||
fadeIn += Time.deltaTime;
|
||||
m_alpha = Mathf.Clamp01(fadeIn / fadeDuration);
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_alpha = 1f;
|
||||
}
|
||||
|
||||
float typeTime = 0f;
|
||||
int totalChars = line.text.Length;
|
||||
if (typewriterCharsPerSecond > 0f)
|
||||
{
|
||||
while (m_currentText.Length < totalChars)
|
||||
{
|
||||
typeTime += Time.deltaTime;
|
||||
int visibleChars = Mathf.Clamp(Mathf.FloorToInt(typeTime * typewriterCharsPerSecond), 0, totalChars);
|
||||
m_currentText = line.text.Substring(0, visibleChars);
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_currentText = line.text;
|
||||
}
|
||||
|
||||
float holdDuration = Mathf.Max(0f, line.duration - (typewriterCharsPerSecond > 0f ? typeTime : 0f));
|
||||
if (holdDuration > 0f)
|
||||
yield return new WaitForSeconds(holdDuration);
|
||||
|
||||
if (fadeDuration > 0f)
|
||||
{
|
||||
float fadeOut = fadeDuration;
|
||||
while (fadeOut > 0f)
|
||||
{
|
||||
fadeOut -= Time.deltaTime;
|
||||
m_alpha = Mathf.Clamp01(fadeOut / fadeDuration);
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
m_alpha = 0f;
|
||||
m_isShowing = false;
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (!m_isShowing || string.IsNullOrEmpty(m_currentText))
|
||||
return;
|
||||
|
||||
EnsureStyles();
|
||||
|
||||
float maxWidth = Mathf.Min(Screen.width - 24f, 940f);
|
||||
float textWidth = maxWidth - horizontalPadding * 2f;
|
||||
float speakerHeight = string.IsNullOrEmpty(m_currentSpeaker)
|
||||
? 0f
|
||||
: m_speakerStyle.CalcHeight(new GUIContent(m_currentSpeaker), textWidth);
|
||||
float textHeight = m_textStyle.CalcHeight(new GUIContent(string.IsNullOrEmpty(m_currentText) ? " " : m_currentText), textWidth);
|
||||
|
||||
float boxWidth = maxWidth;
|
||||
float boxHeight = speakerHeight + textHeight + 28f;
|
||||
float boxX = (Screen.width - boxWidth) * 0.5f;
|
||||
float boxY = Screen.height - bottomOffset - boxHeight;
|
||||
|
||||
Rect boxRect = new Rect(boxX, boxY, boxWidth, boxHeight);
|
||||
Color previousColor = GUI.color;
|
||||
GUI.color = new Color(1f, 1f, 1f, m_alpha);
|
||||
GUI.DrawTexture(boxRect, m_background);
|
||||
|
||||
float yOffset = boxRect.y + 10f;
|
||||
if (!string.IsNullOrEmpty(m_currentSpeaker))
|
||||
{
|
||||
Rect speakerRect = new Rect(
|
||||
boxRect.x + horizontalPadding,
|
||||
yOffset,
|
||||
textWidth,
|
||||
speakerHeight);
|
||||
GUI.Label(speakerRect, m_currentSpeaker, m_speakerStyle);
|
||||
yOffset += speakerHeight + 2f;
|
||||
}
|
||||
|
||||
Rect textRect = new Rect(
|
||||
boxRect.x + horizontalPadding,
|
||||
yOffset,
|
||||
textWidth,
|
||||
textHeight);
|
||||
|
||||
GUI.Label(textRect, m_currentText, m_textStyle);
|
||||
GUI.color = previousColor;
|
||||
}
|
||||
|
||||
private void EnsureStyles()
|
||||
{
|
||||
if (m_textStyle != null)
|
||||
return;
|
||||
|
||||
m_background = new Texture2D(1, 1);
|
||||
m_background.SetPixel(0, 0, backgroundColor);
|
||||
m_background.Apply();
|
||||
|
||||
m_textStyle = new GUIStyle(GUI.skin.label)
|
||||
{
|
||||
alignment = TextAnchor.MiddleCenter,
|
||||
fontSize = fontSize,
|
||||
wordWrap = true,
|
||||
richText = false,
|
||||
clipping = TextClipping.Clip,
|
||||
};
|
||||
m_textStyle.normal.textColor = textColor;
|
||||
|
||||
m_speakerStyle = new GUIStyle(GUI.skin.label)
|
||||
{
|
||||
alignment = TextAnchor.MiddleCenter,
|
||||
fontSize = speakerFontSize,
|
||||
fontStyle = FontStyle.Bold,
|
||||
wordWrap = false,
|
||||
clipping = TextClipping.Clip,
|
||||
};
|
||||
m_speakerStyle.normal.textColor = speakerColor;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (m_background != null)
|
||||
Destroy(m_background);
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Scripts/Level/SubtitleSequencePlayer.cs.meta
Normal file
2
Assets/Code/Scripts/Level/SubtitleSequencePlayer.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4947743d7bc9b4589b9932d429517d3a
|
||||
51
Assets/Code/Scripts/Level/SubtitleTriggerZone.cs
Normal file
51
Assets/Code/Scripts/Level/SubtitleTriggerZone.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger zone that starts a subtitle JSON sequence on a linked SubtitleSequencePlayer.
|
||||
/// Put this on the zone collider object, and link the player on your empty object.
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(Collider))]
|
||||
public class SubtitleTriggerZone : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
[SerializeField] private SubtitleSequencePlayer subtitlePlayer;
|
||||
[SerializeField] private TextAsset subtitleJson;
|
||||
|
||||
[Header("Playback")]
|
||||
[SerializeField] private float initialDelay = 0f;
|
||||
[SerializeField] private bool oneShot = true;
|
||||
|
||||
private bool m_hasPlayed;
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
Collider col = GetComponent<Collider>();
|
||||
col.isTrigger = true;
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (!IsPlayer(other))
|
||||
return;
|
||||
|
||||
if (oneShot && m_hasPlayed)
|
||||
return;
|
||||
|
||||
if (subtitlePlayer == null)
|
||||
return;
|
||||
|
||||
if (subtitlePlayer.TryPlay(subtitleJson, initialDelay))
|
||||
m_hasPlayed = true;
|
||||
}
|
||||
|
||||
private bool IsPlayer(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
return true;
|
||||
|
||||
if (other.GetComponentInParent<PlayerMovement>() != null)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Scripts/Level/SubtitleTriggerZone.cs.meta
Normal file
2
Assets/Code/Scripts/Level/SubtitleTriggerZone.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33a33c65f75e2443383c2e29bd6bf5f1
|
||||
@@ -25,7 +25,7 @@
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "Pickup",
|
||||
"name": "HeadInteract",
|
||||
"type": "Button",
|
||||
"id": "5a0c555a-8fc4-4188-9eed-401eb8f017b5",
|
||||
"expectedControlType": "",
|
||||
@@ -100,7 +100,16 @@
|
||||
"name": "Sprint",
|
||||
"type": "Button",
|
||||
"id": "641cd816-40e6-41b4-8c3d-04687c349290",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Shift",
|
||||
"type": "Button",
|
||||
"id": "082f2b53-d4e1-4cc7-b174-c2975cd57d3f",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
@@ -495,7 +504,7 @@
|
||||
{
|
||||
"name": "",
|
||||
"id": "05a519b8-f991-4f43-a438-fbe3db38625b",
|
||||
"path": "<Mouse>/rightButton",
|
||||
"path": "<Mouse>/leftButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
@@ -510,7 +519,18 @@
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Pickup",
|
||||
"action": "HeadInteract",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "768d31fb-914a-42c1-900b-45ff3725e46c",
|
||||
"path": "<Keyboard>/shift",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Touch;Keyboard&Mouse",
|
||||
"action": "Shift",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
|
||||
120
Assets/Code/Scripts/Player/PlayerHeadControll.cs
Normal file
120
Assets/Code/Scripts/Player/PlayerHeadControll.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerHeadController : MonoBehaviour
|
||||
{
|
||||
public Transform Head;
|
||||
public Transform CameraTransform;
|
||||
|
||||
public Transform BodyTransform;
|
||||
|
||||
|
||||
public float ThrowForce;
|
||||
public float PickupDistance;
|
||||
public bool isHoldingHead;
|
||||
|
||||
private Rigidbody m_headRigidbody;
|
||||
|
||||
private Vector3 m_headInitialLocalPos;
|
||||
private Quaternion m_headInitialLocalRot;
|
||||
|
||||
private Animator animator;
|
||||
private PlayerInputController input;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
animator = GetComponent<Animator>();
|
||||
input = GetComponent<PlayerInputController>();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
|
||||
Vector3 offset = new Vector3(0f, -0.5f, 0.5f);
|
||||
|
||||
m_headInitialLocalPos = BodyTransform.localPosition + offset;
|
||||
m_headInitialLocalRot = BodyTransform.localRotation;
|
||||
m_headRigidbody = Head.GetComponent<Rigidbody>();
|
||||
|
||||
Head.SetParent(null);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (input.HeadInteractionPressed)
|
||||
{
|
||||
InteractHead();
|
||||
}
|
||||
|
||||
if (input.ThrowPressed)
|
||||
{
|
||||
ThrowHead();
|
||||
}
|
||||
}
|
||||
|
||||
private void InteractHead()
|
||||
{
|
||||
if (!isHoldingHead)
|
||||
TryPickupHead();
|
||||
else
|
||||
DropHead();
|
||||
}
|
||||
|
||||
private void DropHead()
|
||||
{
|
||||
Debug.Log("DropHead");
|
||||
animator.SetTrigger("Throw");
|
||||
|
||||
isHoldingHead = false;
|
||||
|
||||
Head.SetParent(null);
|
||||
|
||||
m_headRigidbody = Head.gameObject.AddComponent<Rigidbody>();
|
||||
m_headRigidbody.mass = 1f;
|
||||
|
||||
m_headRigidbody.constraints =
|
||||
RigidbodyConstraints.FreezeRotationX |
|
||||
RigidbodyConstraints.FreezeRotationZ |
|
||||
RigidbodyConstraints.FreezeRotationY;
|
||||
}
|
||||
|
||||
private void ThrowHead()
|
||||
{
|
||||
Debug.Log("ThrowHead");
|
||||
if (!isHoldingHead)
|
||||
return;
|
||||
|
||||
DropHead();
|
||||
|
||||
m_headRigidbody.AddForce(CameraTransform.forward * ThrowForce, ForceMode.Impulse);
|
||||
}
|
||||
|
||||
private void TryPickupHead()
|
||||
{
|
||||
if (isHoldingHead)
|
||||
return;
|
||||
|
||||
float distance = Vector3.Distance(transform.position, Head.position);
|
||||
|
||||
if (distance <= PickupDistance)
|
||||
{
|
||||
PickupHead();
|
||||
}
|
||||
}
|
||||
|
||||
private void PickupHead()
|
||||
{
|
||||
Debug.Log("PickupHead");
|
||||
isHoldingHead = true;
|
||||
|
||||
if (m_headRigidbody != null)
|
||||
{
|
||||
Destroy(m_headRigidbody);
|
||||
}
|
||||
|
||||
Head.SetParent(transform);
|
||||
|
||||
Head.localPosition = m_headInitialLocalPos;
|
||||
Head.localRotation = m_headInitialLocalRot;
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Scripts/Player/PlayerHeadControll.cs.meta
Normal file
2
Assets/Code/Scripts/Player/PlayerHeadControll.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2da51dfecccc45b469912e3bb3f1953b
|
||||
72
Assets/Code/Scripts/Player/PlayerInputHandler.cs
Normal file
72
Assets/Code/Scripts/Player/PlayerInputHandler.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class PlayerInputController : MonoBehaviour
|
||||
{
|
||||
public InputActionAsset InputActions;
|
||||
public bool InputEnabled { get; private set; } = true;
|
||||
|
||||
private InputAction m_moveAction;
|
||||
private InputAction m_lookAction;
|
||||
private InputAction m_jumpAction;
|
||||
private InputAction m_throwAction;
|
||||
private InputAction m_shiftAction;
|
||||
private InputAction m_headInteractAction;
|
||||
|
||||
public Vector2 MoveAmount { get; private set; }
|
||||
public Vector2 LookAmount { get; private set; }
|
||||
|
||||
public bool JumpPressed { get; private set; }
|
||||
public bool ShiftPressed { get; private set; }
|
||||
public bool ThrowPressed { get; private set; }
|
||||
public bool HeadInteractionPressed { get; private set; }
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
var map = InputActions.FindActionMap("Player");
|
||||
|
||||
m_moveAction = map.FindAction("Move");
|
||||
m_lookAction = map.FindAction("Look");
|
||||
m_jumpAction = map.FindAction("Jump");
|
||||
m_shiftAction = map.FindAction("Shift");
|
||||
m_throwAction = map.FindAction("Throw");
|
||||
m_headInteractAction = map.FindAction("HeadInteract");
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
InputActions.FindActionMap("Player").Enable();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
InputActions.FindActionMap("Player").Disable();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!InputEnabled)
|
||||
{
|
||||
MoveAmount = Vector2.zero;
|
||||
LookAmount = Vector2.zero;
|
||||
ShiftPressed = false;
|
||||
JumpPressed = false;
|
||||
ThrowPressed = false;
|
||||
HeadInteractionPressed = false;
|
||||
return;
|
||||
}
|
||||
|
||||
MoveAmount = m_moveAction.ReadValue<Vector2>();
|
||||
LookAmount = m_lookAction.ReadValue<Vector2>();
|
||||
|
||||
ShiftPressed = m_shiftAction.IsPressed();
|
||||
JumpPressed = m_jumpAction.WasPressedThisFrame();
|
||||
ThrowPressed = m_throwAction.WasPressedThisFrame();
|
||||
HeadInteractionPressed = m_headInteractAction.WasPressedThisFrame();
|
||||
}
|
||||
|
||||
public void SetInputEnabled(bool enabled)
|
||||
{
|
||||
InputEnabled = enabled;
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Scripts/Player/PlayerInputHandler.cs.meta
Normal file
2
Assets/Code/Scripts/Player/PlayerInputHandler.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d8f349ed7dc088a4a6e2690ee87094a
|
||||
34
Assets/Code/Scripts/Player/PlayerJump.cs
Normal file
34
Assets/Code/Scripts/Player/PlayerJump.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerJump : MonoBehaviour
|
||||
{
|
||||
public float JumpForce = 5;
|
||||
|
||||
public Transform GroundCheck;
|
||||
public float GroundCheckRadius = 0.2f;
|
||||
|
||||
private Rigidbody m_rigidbody;
|
||||
private PlayerInputController input;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
m_rigidbody = GetComponent<Rigidbody>();
|
||||
input = GetComponent<PlayerInputController>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (input.JumpPressed)
|
||||
{
|
||||
Jump();
|
||||
}
|
||||
}
|
||||
|
||||
public void Jump()
|
||||
{
|
||||
if (Physics.CheckSphere(GroundCheck.position, GroundCheckRadius, LayerMask.GetMask("Ground")))
|
||||
{
|
||||
m_rigidbody.AddForce(Vector3.up * JumpForce, ForceMode.Impulse);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Scripts/Player/PlayerJump.cs.meta
Normal file
2
Assets/Code/Scripts/Player/PlayerJump.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c524d12bc1668e42a00cbd8050107f6
|
||||
57
Assets/Code/Scripts/Player/PlayerLook.cs
Normal file
57
Assets/Code/Scripts/Player/PlayerLook.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerLook : MonoBehaviour
|
||||
{
|
||||
public Transform CameraTransform;
|
||||
public Transform Head;
|
||||
|
||||
public float RotateSpeed = 5;
|
||||
public float MaxLookAngle = 90f;
|
||||
|
||||
private float m_verticalRotation = 0f;
|
||||
|
||||
private Rigidbody m_rigidbody;
|
||||
private PlayerInputController input;
|
||||
private PlayerHeadController headController;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
m_rigidbody = GetComponent<Rigidbody>();
|
||||
input = GetComponent<PlayerInputController>();
|
||||
headController = GetComponent<PlayerHeadController>();
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
Vector2 m_lookAmt = input.LookAmount;
|
||||
|
||||
if (m_lookAmt.magnitude <= 0.01f)
|
||||
return;
|
||||
|
||||
if (!headController.isHoldingHead || input.ShiftPressed && headController.isHoldingHead)
|
||||
{
|
||||
float headRotation = m_lookAmt.x * RotateSpeed * Time.deltaTime;
|
||||
Head.Rotate(0, headRotation, 0);
|
||||
|
||||
if (CameraTransform != null)
|
||||
{
|
||||
m_verticalRotation -= m_lookAmt.y * RotateSpeed * Time.deltaTime;
|
||||
m_verticalRotation = Mathf.Clamp(m_verticalRotation, -MaxLookAngle, MaxLookAngle);
|
||||
CameraTransform.localRotation = Quaternion.Euler(m_verticalRotation, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
float horizontalRotation = m_lookAmt.x * RotateSpeed * Time.deltaTime;
|
||||
Quaternion deltaRotation = Quaternion.Euler(0, horizontalRotation, 0);
|
||||
m_rigidbody.MoveRotation(m_rigidbody.rotation * deltaRotation);
|
||||
|
||||
if (CameraTransform != null)
|
||||
{
|
||||
m_verticalRotation -= m_lookAmt.y * RotateSpeed * Time.deltaTime;
|
||||
m_verticalRotation = Mathf.Clamp(m_verticalRotation, -MaxLookAngle, MaxLookAngle);
|
||||
CameraTransform.localRotation = Quaternion.Euler(m_verticalRotation, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Scripts/Player/PlayerLook.cs.meta
Normal file
2
Assets/Code/Scripts/Player/PlayerLook.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c1ddada0161b8c4783806ef6775348a
|
||||
@@ -1,216 +1,74 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class PlayerMovement : MonoBehaviour
|
||||
{
|
||||
public InputActionAsset InputActions;
|
||||
|
||||
private InputAction m_moveAction;
|
||||
private InputAction m_lookAction;
|
||||
private InputAction m_jumpAction;
|
||||
private InputAction m_throwAction;
|
||||
private InputAction m_pickupAction;
|
||||
|
||||
private Vector2 m_moveAmt;
|
||||
private Vector2 m_lookAmt;
|
||||
|
||||
private Rigidbody m_rigidbody;
|
||||
|
||||
[Header("Camera/Head")]
|
||||
public Transform CameraTransform;
|
||||
public float MaxLookAngle = 90f;
|
||||
|
||||
private float m_verticalRotation = 0f;
|
||||
|
||||
public float WalkSpeed = 10;
|
||||
public float RotateSpeed = 5;
|
||||
public float JumpForce = 5;
|
||||
|
||||
public Transform GroundCheck;
|
||||
public float GroundCheckRadius = 0.2f;
|
||||
public float rotationSpeed = 10f;
|
||||
|
||||
public Animator animator;
|
||||
public Transform cameraTransform;
|
||||
|
||||
[Header("Head Settings")]
|
||||
public Transform Head;
|
||||
public float ThrowForce = 10f;
|
||||
public float PickupDistance = 3f;
|
||||
private Rigidbody m_rigidbody;
|
||||
private PlayerInputController input;
|
||||
private PlayerHeadController headController;
|
||||
|
||||
private bool m_isHeadThrown = false;
|
||||
private Rigidbody m_headRigidbody;
|
||||
|
||||
private Vector3 m_headInitialLocalPos;
|
||||
private Quaternion m_headInitialLocalRot;
|
||||
private Vector3 moveDirection;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
var map = InputActions.FindActionMap("Player");
|
||||
|
||||
m_moveAction = map.FindAction("Move");
|
||||
m_lookAction = map.FindAction("Look");
|
||||
m_jumpAction = map.FindAction("Jump");
|
||||
// Support both old and new action names without breaking the scene setup.
|
||||
m_throwAction = map.FindAction("Throw") ?? map.FindAction("Attack");
|
||||
m_pickupAction = map.FindAction("Pickup") ?? map.FindAction("Interact");
|
||||
|
||||
m_rigidbody = GetComponent<Rigidbody>();
|
||||
input = GetComponent<PlayerInputController>();
|
||||
animator = GetComponent<Animator>();
|
||||
}
|
||||
headController = GetComponent<PlayerHeadController>();
|
||||
|
||||
private void OnEnable()
|
||||
if (m_rigidbody != null)
|
||||
{
|
||||
InputActions.FindActionMap("Player").Enable();
|
||||
m_rigidbody.freezeRotation = true;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
InputActions.FindActionMap("Player").Disable();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
m_headInitialLocalPos = Head.localPosition;
|
||||
m_headInitialLocalRot = Head.localRotation;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
m_moveAmt = m_moveAction != null ? m_moveAction.ReadValue<Vector2>() : Vector2.zero;
|
||||
m_lookAmt = m_lookAction != null ? m_lookAction.ReadValue<Vector2>() : Vector2.zero;
|
||||
|
||||
if (m_jumpAction != null && m_jumpAction.WasPressedThisFrame())
|
||||
{
|
||||
Jump();
|
||||
}
|
||||
|
||||
if (m_throwAction != null && m_throwAction.WasPressedThisFrame())
|
||||
{
|
||||
ThrowHead();
|
||||
}
|
||||
|
||||
if (m_pickupAction != null && (m_pickupAction.WasPressedThisFrame() || m_pickupAction.WasPerformedThisFrame()))
|
||||
{
|
||||
TryPickupHead();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
Walking();
|
||||
Rotating();
|
||||
}
|
||||
Vector2 m_moveAmt = input.MoveAmount;
|
||||
|
||||
private void Walking()
|
||||
float horizontal = m_moveAmt.x;
|
||||
float vertical = m_moveAmt.y;
|
||||
|
||||
Vector3 cameraForward = cameraTransform.forward;
|
||||
Vector3 cameraRight = cameraTransform.right;
|
||||
|
||||
cameraForward.y = 0f;
|
||||
cameraRight.y = 0f;
|
||||
|
||||
cameraForward.Normalize();
|
||||
cameraRight.Normalize();
|
||||
|
||||
moveDirection = (cameraForward * vertical + cameraRight * horizontal).normalized;
|
||||
|
||||
if (headController.isHoldingHead)
|
||||
{
|
||||
Vector3 move =
|
||||
transform.forward * m_moveAmt.y +
|
||||
transform.right * m_moveAmt.x;
|
||||
|
||||
m_rigidbody.MovePosition(
|
||||
m_rigidbody.position + move * WalkSpeed * Time.deltaTime
|
||||
m_rigidbody.position + Time.deltaTime * WalkSpeed * moveDirection
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (moveDirection.magnitude >= 0.1f)
|
||||
{
|
||||
m_rigidbody.MovePosition(
|
||||
m_rigidbody.position + Time.deltaTime * WalkSpeed * moveDirection
|
||||
);
|
||||
|
||||
Quaternion targetRotation = Quaternion.LookRotation(moveDirection);
|
||||
transform.rotation = Quaternion.Slerp(
|
||||
transform.rotation,
|
||||
targetRotation,
|
||||
rotationSpeed * Time.deltaTime
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
bool isMoving = m_moveAmt.magnitude > 0.1f;
|
||||
animator.SetBool("isWalking", isMoving);
|
||||
}
|
||||
|
||||
|
||||
private void Rotating()
|
||||
{
|
||||
if (m_lookAmt.magnitude <= 0.01f)
|
||||
return;
|
||||
|
||||
if (!m_isHeadThrown)
|
||||
{
|
||||
// NORMAL BODY ROTATION
|
||||
float horizontalRotation = m_lookAmt.x * RotateSpeed * Time.deltaTime;
|
||||
Quaternion deltaRotation = Quaternion.Euler(0, horizontalRotation, 0);
|
||||
m_rigidbody.MoveRotation(m_rigidbody.rotation * deltaRotation);
|
||||
|
||||
if (CameraTransform != null)
|
||||
{
|
||||
m_verticalRotation -= m_lookAmt.y * RotateSpeed * Time.deltaTime;
|
||||
m_verticalRotation = Mathf.Clamp(m_verticalRotation, -MaxLookAngle, MaxLookAngle);
|
||||
CameraTransform.localRotation = Quaternion.Euler(m_verticalRotation, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// HEAD ROTATION ON GROUND
|
||||
float headRotation = m_lookAmt.x * RotateSpeed * Time.deltaTime;
|
||||
Head.Rotate(0, headRotation, 0);
|
||||
|
||||
// Add vertical camera rotation when head is on ground
|
||||
if (CameraTransform != null)
|
||||
{
|
||||
m_verticalRotation -= m_lookAmt.y * RotateSpeed * Time.deltaTime;
|
||||
m_verticalRotation = Mathf.Clamp(m_verticalRotation, -MaxLookAngle, MaxLookAngle);
|
||||
CameraTransform.localRotation = Quaternion.Euler(m_verticalRotation, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Jump()
|
||||
{
|
||||
if (Physics.CheckSphere(GroundCheck.position, GroundCheckRadius, LayerMask.GetMask("Ground"))) {
|
||||
m_rigidbody.AddForce(Vector3.up * JumpForce, ForceMode.Impulse);
|
||||
}
|
||||
}
|
||||
|
||||
private void ThrowHead()
|
||||
{
|
||||
if (m_isHeadThrown)
|
||||
return;
|
||||
|
||||
animator.SetTrigger("Throw");
|
||||
|
||||
m_isHeadThrown = true;
|
||||
|
||||
Head.SetParent(null);
|
||||
|
||||
m_headRigidbody = Head.gameObject.AddComponent<Rigidbody>();
|
||||
m_headRigidbody.mass = 1f;
|
||||
|
||||
m_headRigidbody.constraints =
|
||||
RigidbodyConstraints.FreezeRotationX |
|
||||
RigidbodyConstraints.FreezeRotationZ;
|
||||
|
||||
m_headRigidbody.AddForce(CameraTransform.forward * ThrowForce, ForceMode.Impulse);
|
||||
}
|
||||
|
||||
private void TryPickupHead()
|
||||
{
|
||||
if (!m_isHeadThrown)
|
||||
return;
|
||||
|
||||
float distance = Vector3.Distance(transform.position, Head.position);
|
||||
|
||||
if (distance <= PickupDistance)
|
||||
{
|
||||
PickupHead();
|
||||
}
|
||||
}
|
||||
|
||||
private void PickupHead()
|
||||
{
|
||||
m_isHeadThrown = false;
|
||||
|
||||
// Remove Rigidbody
|
||||
if (m_headRigidbody != null)
|
||||
{
|
||||
Destroy(m_headRigidbody);
|
||||
}
|
||||
|
||||
// Reattach to player
|
||||
Head.SetParent(transform);
|
||||
|
||||
// Reset position & rotation
|
||||
Head.localPosition = m_headInitialLocalPos;
|
||||
Head.localRotation = m_headInitialLocalRot;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d8f349ed7dc088a4a6e2690ee87094a
|
||||
guid: 7f91586e8c2742341aa8f6925e597bf1
|
||||
264
Assets/Code/Scripts/Player/RobotBootSequence.cs
Normal file
264
Assets/Code/Scripts/Player/RobotBootSequence.cs
Normal file
@@ -0,0 +1,264 @@
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RobotBootSequence : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
public PlayerInputController InputController;
|
||||
public Transform CameraTransform;
|
||||
|
||||
[Header("Timing")]
|
||||
public bool PlayOnStart = true;
|
||||
[Min(0.1f)] public float BootDuration = 2.4f;
|
||||
[Min(0.1f)] public float CharacterPerSecond = 40f;
|
||||
[Min(0f)] public float LinePause = 0.35f;
|
||||
[Min(0f)] public float DelayBeforeReveal = 0.4f;
|
||||
|
||||
[Header("Motion")]
|
||||
public Vector2 StartYawPitch = new Vector2(-30f, -20f);
|
||||
public float RollWobble = 2.5f;
|
||||
public float WobbleFrequency = 16f;
|
||||
public AnimationCurve EaseCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
|
||||
|
||||
[Header("Boot Text")]
|
||||
public Color BootTextColor = new Color(0.62f, 1f, 0.7f, 1f);
|
||||
public string[] BootLines =
|
||||
{
|
||||
"UNIT SB-3954 | preparing startup . . .",
|
||||
"verification of OS-5 . . . 4 . . . 3 . . . 2 . . . 1",
|
||||
"system integrity: OK",
|
||||
"motor bus: OK",
|
||||
"vision pipeline: ONLINE",
|
||||
"SYSTEM OK"
|
||||
};
|
||||
|
||||
[Header("Optional Audio")]
|
||||
public AudioSource BootAudioSource;
|
||||
|
||||
private bool m_IsPlaying;
|
||||
|
||||
private struct BootUI
|
||||
{
|
||||
public Canvas Canvas;
|
||||
public RectTransform LeftPanel;
|
||||
public RectTransform RightPanel;
|
||||
public TextMeshProUGUI Text;
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (InputController == null)
|
||||
{
|
||||
InputController = GetComponent<PlayerInputController>();
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (PlayOnStart)
|
||||
{
|
||||
StartCoroutine(PlayBootSequence());
|
||||
}
|
||||
}
|
||||
|
||||
[ContextMenu("Play Boot Sequence")]
|
||||
public void PlayBootSequenceFromMenu()
|
||||
{
|
||||
if (!Application.isPlaying || m_IsPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
StartCoroutine(PlayBootSequence());
|
||||
}
|
||||
|
||||
public IEnumerator PlayBootSequence()
|
||||
{
|
||||
if (m_IsPlaying)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
m_IsPlaying = true;
|
||||
|
||||
if (InputController != null)
|
||||
{
|
||||
InputController.SetInputEnabled(false);
|
||||
}
|
||||
|
||||
if (BootAudioSource != null)
|
||||
{
|
||||
BootAudioSource.Play();
|
||||
}
|
||||
|
||||
if (CameraTransform == null)
|
||||
{
|
||||
m_IsPlaying = false;
|
||||
if (InputController != null)
|
||||
{
|
||||
InputController.SetInputEnabled(true);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
Quaternion gameplayRotation = CameraTransform.localRotation;
|
||||
Quaternion fromRotation = Quaternion.Euler(StartYawPitch.y, StartYawPitch.x, 0f) * gameplayRotation;
|
||||
CameraTransform.localRotation = fromRotation;
|
||||
|
||||
BootUI bootUI = CreateBootUI();
|
||||
|
||||
yield return StartCoroutine(PlayBootText(bootUI.Text));
|
||||
|
||||
if (DelayBeforeReveal > 0f)
|
||||
{
|
||||
yield return new WaitForSeconds(DelayBeforeReveal);
|
||||
}
|
||||
|
||||
float elapsed = 0f;
|
||||
while (elapsed < BootDuration)
|
||||
{
|
||||
elapsed += Time.deltaTime;
|
||||
float t = Mathf.Clamp01(elapsed / BootDuration);
|
||||
float eased = EaseCurve.Evaluate(t);
|
||||
|
||||
float wobbleFade = 1f - eased;
|
||||
float roll = Mathf.Sin(Time.time * WobbleFrequency) * RollWobble * wobbleFade;
|
||||
Quaternion wobbleRotation = Quaternion.Euler(0f, 0f, roll);
|
||||
|
||||
CameraTransform.localRotation = Quaternion.Slerp(fromRotation, gameplayRotation, eased) * wobbleRotation;
|
||||
|
||||
RectTransform rootRect = bootUI.Canvas.GetComponent<RectTransform>();
|
||||
float halfWidth = rootRect.rect.width * 0.5f;
|
||||
float leftTarget = -(halfWidth + 24f);
|
||||
float rightTarget = halfWidth + 24f;
|
||||
bootUI.LeftPanel.anchoredPosition = new Vector2(Mathf.Lerp(0f, leftTarget, eased), 0f);
|
||||
bootUI.RightPanel.anchoredPosition = new Vector2(Mathf.Lerp(0f, rightTarget, eased), 0f);
|
||||
|
||||
Color textColor = bootUI.Text.color;
|
||||
textColor.a = 1f - eased;
|
||||
bootUI.Text.color = textColor;
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
CameraTransform.localRotation = gameplayRotation;
|
||||
|
||||
if (bootUI.Canvas != null)
|
||||
{
|
||||
Destroy(bootUI.Canvas.gameObject);
|
||||
}
|
||||
|
||||
if (InputController != null)
|
||||
{
|
||||
InputController.SetInputEnabled(true);
|
||||
}
|
||||
|
||||
m_IsPlaying = false;
|
||||
}
|
||||
|
||||
private IEnumerator PlayBootText(TextMeshProUGUI label)
|
||||
{
|
||||
if (label == null || BootLines == null || BootLines.Length == 0)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
label.text = string.Empty;
|
||||
float charDelay = CharacterPerSecond <= 0f ? 0f : 1f / CharacterPerSecond;
|
||||
|
||||
for (int i = 0; i < BootLines.Length; i++)
|
||||
{
|
||||
string line = BootLines[i];
|
||||
for (int c = 0; c < line.Length; c++)
|
||||
{
|
||||
label.text += line[c];
|
||||
if (charDelay > 0f)
|
||||
{
|
||||
yield return new WaitForSeconds(charDelay);
|
||||
}
|
||||
}
|
||||
|
||||
if (i < BootLines.Length - 1)
|
||||
{
|
||||
label.text += "\n";
|
||||
}
|
||||
|
||||
if (LinePause > 0f)
|
||||
{
|
||||
yield return new WaitForSeconds(LinePause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private BootUI CreateBootUI()
|
||||
{
|
||||
BootUI ui = new BootUI();
|
||||
|
||||
GameObject canvasGO = new GameObject("RobotBootCanvas", typeof(Canvas), typeof(CanvasScaler), typeof(GraphicRaycaster));
|
||||
Canvas canvas = canvasGO.GetComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
canvas.sortingOrder = 5000;
|
||||
|
||||
CanvasScaler scaler = canvasGO.GetComponent<CanvasScaler>();
|
||||
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
scaler.referenceResolution = new Vector2(1920f, 1080f);
|
||||
scaler.matchWidthOrHeight = 0.5f;
|
||||
|
||||
RectTransform root = canvasGO.GetComponent<RectTransform>();
|
||||
root.anchorMin = Vector2.zero;
|
||||
root.anchorMax = Vector2.one;
|
||||
root.offsetMin = Vector2.zero;
|
||||
root.offsetMax = Vector2.zero;
|
||||
|
||||
RectTransform leftPanel = CreatePanel("LeftPanel", root, true);
|
||||
RectTransform rightPanel = CreatePanel("RightPanel", root, false);
|
||||
TextMeshProUGUI label = CreateBootLabel(root);
|
||||
|
||||
ui.Canvas = canvas;
|
||||
ui.LeftPanel = leftPanel;
|
||||
ui.RightPanel = rightPanel;
|
||||
ui.Text = label;
|
||||
|
||||
return ui;
|
||||
}
|
||||
|
||||
private RectTransform CreatePanel(string panelName, RectTransform parent, bool isLeft)
|
||||
{
|
||||
GameObject panelGO = new GameObject(panelName, typeof(RectTransform), typeof(Image));
|
||||
RectTransform rect = panelGO.GetComponent<RectTransform>();
|
||||
rect.SetParent(parent, false);
|
||||
rect.anchorMin = isLeft ? new Vector2(0f, 0f) : new Vector2(0.5f, 0f);
|
||||
rect.anchorMax = isLeft ? new Vector2(0.5f, 1f) : new Vector2(1f, 1f);
|
||||
rect.pivot = new Vector2(0.5f, 0.5f);
|
||||
rect.offsetMin = Vector2.zero;
|
||||
rect.offsetMax = Vector2.zero;
|
||||
rect.anchoredPosition = Vector2.zero;
|
||||
|
||||
Image image = panelGO.GetComponent<Image>();
|
||||
image.color = Color.black;
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
private TextMeshProUGUI CreateBootLabel(RectTransform parent)
|
||||
{
|
||||
GameObject textGO = new GameObject("BootText", typeof(RectTransform), typeof(TextMeshProUGUI));
|
||||
RectTransform rect = textGO.GetComponent<RectTransform>();
|
||||
rect.SetParent(parent, false);
|
||||
rect.anchorMin = new Vector2(0.13f, 0.5f);
|
||||
rect.anchorMax = new Vector2(0.13f, 0.5f);
|
||||
rect.pivot = new Vector2(0f, 0.5f);
|
||||
rect.sizeDelta = new Vector2(980f, 380f);
|
||||
|
||||
TextMeshProUGUI text = textGO.GetComponent<TextMeshProUGUI>();
|
||||
text.text = string.Empty;
|
||||
text.fontSize = 40f;
|
||||
text.alignment = TextAlignmentOptions.Left;
|
||||
text.color = BootTextColor;
|
||||
text.textWrappingMode = TextWrappingModes.Normal;
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
||||
11
Assets/Code/Scripts/Player/RobotBootSequence.cs.meta
Normal file
11
Assets/Code/Scripts/Player/RobotBootSequence.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ef6855cd57b4f94b47f410d47e89ff1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
216
Assets/Code/Scripts/Player/test.cs
Normal file
216
Assets/Code/Scripts/Player/test.cs
Normal file
@@ -0,0 +1,216 @@
|
||||
//using TMPro;
|
||||
//using UnityEngine;
|
||||
//using UnityEngine.InputSystem;
|
||||
|
||||
//public class PlayerMovement : MonoBehaviour
|
||||
//{
|
||||
// public InputActionAsset InputActions;
|
||||
|
||||
// private InputAction m_moveAction;
|
||||
// private InputAction m_lookAction;
|
||||
// private InputAction m_jumpAction;
|
||||
// private InputAction m_throwAction;
|
||||
// private InputAction m_pickupAction;
|
||||
|
||||
// private Vector2 m_moveAmt;
|
||||
// private Vector2 m_lookAmt;
|
||||
|
||||
// private Rigidbody m_rigidbody;
|
||||
|
||||
// [Header("Camera/Head")]
|
||||
// public Transform CameraTransform;
|
||||
// public float MaxLookAngle = 90f;
|
||||
|
||||
// private float m_verticalRotation = 0f;
|
||||
|
||||
// public float WalkSpeed = 10;
|
||||
// public float RotateSpeed = 5;
|
||||
// public float JumpForce = 5;
|
||||
|
||||
// public Transform GroundCheck;
|
||||
// public float GroundCheckRadius = 0.2f;
|
||||
|
||||
// public Animator animator;
|
||||
|
||||
// [Header("Head Settings")]
|
||||
// public Transform Head;
|
||||
// public float ThrowForce = 10f;
|
||||
// public float PickupDistance = 3f;
|
||||
|
||||
// private bool m_isHeadThrown = false;
|
||||
// private Rigidbody m_headRigidbody;
|
||||
|
||||
// private Vector3 m_headInitialLocalPos;
|
||||
// private Quaternion m_headInitialLocalRot;
|
||||
|
||||
// private void Awake()
|
||||
// {
|
||||
// var map = InputActions.FindActionMap("Player");
|
||||
|
||||
// m_moveAction = map.FindAction("Move");
|
||||
// m_lookAction = map.FindAction("Look");
|
||||
// m_jumpAction = map.FindAction("Jump");
|
||||
// m_throwAction = map.FindAction("Throw");
|
||||
// m_pickupAction = map.FindAction("Pickup");
|
||||
|
||||
// m_rigidbody = GetComponent<Rigidbody>();
|
||||
// animator = GetComponent<Animator>();
|
||||
// }
|
||||
|
||||
// private void OnEnable()
|
||||
// {
|
||||
// InputActions.FindActionMap("Player").Enable();
|
||||
// }
|
||||
|
||||
// private void OnDisable()
|
||||
// {
|
||||
// InputActions.FindActionMap("Player").Disable();
|
||||
// }
|
||||
|
||||
// void Start()
|
||||
// {
|
||||
// Cursor.lockState = CursorLockMode.Locked;
|
||||
// m_headInitialLocalPos = Head.localPosition;
|
||||
// m_headInitialLocalRot = Head.localRotation;
|
||||
// }
|
||||
|
||||
// private void Update()
|
||||
// {
|
||||
// m_moveAmt = m_moveAction.ReadValue<Vector2>();
|
||||
// m_lookAmt = m_lookAction.ReadValue<Vector2>();
|
||||
|
||||
// if (m_jumpAction.WasPressedThisFrame())
|
||||
// {
|
||||
// Jump();
|
||||
// }
|
||||
|
||||
// if (m_throwAction.WasPressedThisFrame())
|
||||
// {
|
||||
// ThrowHead();
|
||||
// }
|
||||
|
||||
// if (m_pickupAction.WasPressedThisFrame())
|
||||
// {
|
||||
// TryPickupHead();
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// private void FixedUpdate()
|
||||
// {
|
||||
// Walking();
|
||||
// Rotating();
|
||||
// }
|
||||
|
||||
// private void Walking()
|
||||
// {
|
||||
// Vector3 move =
|
||||
// transform.forward * m_moveAmt.y +
|
||||
// transform.right * m_moveAmt.x;
|
||||
|
||||
// m_rigidbody.MovePosition(
|
||||
// m_rigidbody.position + move * WalkSpeed * Time.deltaTime
|
||||
// );
|
||||
|
||||
// bool isMoving = m_moveAmt.magnitude > 0.1f;
|
||||
// animator.SetBool("isWalking", isMoving);
|
||||
// }
|
||||
|
||||
|
||||
// private void Rotating()
|
||||
// {
|
||||
// if (m_lookAmt.magnitude <= 0.01f)
|
||||
// return;
|
||||
|
||||
// if (!m_isHeadThrown)
|
||||
// {
|
||||
// NORMAL BODY ROTATION
|
||||
// float horizontalRotation = m_lookAmt.x * RotateSpeed * Time.deltaTime;
|
||||
// Quaternion deltaRotation = Quaternion.Euler(0, horizontalRotation, 0);
|
||||
// m_rigidbody.MoveRotation(m_rigidbody.rotation * deltaRotation);
|
||||
|
||||
// if (CameraTransform != null)
|
||||
// {
|
||||
// m_verticalRotation -= m_lookAmt.y * RotateSpeed * Time.deltaTime;
|
||||
// m_verticalRotation = Mathf.Clamp(m_verticalRotation, -MaxLookAngle, MaxLookAngle);
|
||||
// CameraTransform.localRotation = Quaternion.Euler(m_verticalRotation, 0, 0);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// HEAD ROTATION ON GROUND
|
||||
// float headRotation = m_lookAmt.x * RotateSpeed * Time.deltaTime;
|
||||
// Head.Rotate(0, headRotation, 0);
|
||||
|
||||
// Add vertical camera rotation when head is on ground
|
||||
// if (CameraTransform != null)
|
||||
// {
|
||||
// m_verticalRotation -= m_lookAmt.y * RotateSpeed * Time.deltaTime;
|
||||
// m_verticalRotation = Mathf.Clamp(m_verticalRotation, -MaxLookAngle, MaxLookAngle);
|
||||
// CameraTransform.localRotation = Quaternion.Euler(m_verticalRotation, 0, 0);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// public void Jump()
|
||||
// {
|
||||
// if (Physics.CheckSphere(GroundCheck.position, GroundCheckRadius, LayerMask.GetMask("Ground")))
|
||||
// {
|
||||
// m_rigidbody.AddForce(Vector3.up * JumpForce, ForceMode.Impulse);
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void ThrowHead()
|
||||
// {
|
||||
// if (m_isHeadThrown)
|
||||
// return;
|
||||
|
||||
// animator.SetTrigger("Throw");
|
||||
|
||||
// m_isHeadThrown = true;
|
||||
|
||||
// Head.SetParent(null);
|
||||
|
||||
// m_headRigidbody = Head.gameObject.AddComponent<Rigidbody>();
|
||||
// m_headRigidbody.mass = 1f;
|
||||
|
||||
// m_headRigidbody.constraints =
|
||||
// RigidbodyConstraints.FreezeRotationX |
|
||||
// RigidbodyConstraints.FreezeRotationZ;
|
||||
|
||||
// m_headRigidbody.AddForce(CameraTransform.forward * ThrowForce, ForceMode.Impulse);
|
||||
// }
|
||||
|
||||
// private void TryPickupHead()
|
||||
// {
|
||||
// if (!m_isHeadThrown)
|
||||
// return;
|
||||
|
||||
// float distance = Vector3.Distance(transform.position, Head.position);
|
||||
|
||||
// if (distance <= PickupDistance)
|
||||
// {
|
||||
// PickupHead();
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void PickupHead()
|
||||
// {
|
||||
// m_isHeadThrown = false;
|
||||
|
||||
// Remove Rigidbody
|
||||
// if (m_headRigidbody != null)
|
||||
// {
|
||||
// Destroy(m_headRigidbody);
|
||||
// }
|
||||
|
||||
// Reattach to player
|
||||
// Head.SetParent(transform);
|
||||
|
||||
// Reset position & rotation
|
||||
// Head.localPosition = m_headInitialLocalPos;
|
||||
// Head.localRotation = m_headInitialLocalRot;
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
2
Assets/Code/Scripts/Player/test.cs.meta
Normal file
2
Assets/Code/Scripts/Player/test.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85fce5e45a2682243a133de9ba0a4324
|
||||
8
Assets/Code/Scripts/Rendering.meta
Normal file
8
Assets/Code/Scripts/Rendering.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97a4ae8015df4732ac9524441048a765
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
123
Assets/Code/Scripts/Rendering/CRTRendererFeature.cs
Normal file
123
Assets/Code/Scripts/Rendering/CRTRendererFeature.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
// using UnityEngine;
|
||||
// using UnityEngine.Rendering;
|
||||
// using UnityEngine.Rendering.RenderGraphModule;
|
||||
// using UnityEngine.Rendering.RenderGraphModule.Util;
|
||||
// using UnityEngine.Rendering.Universal;
|
||||
|
||||
// public class CRTRendererFeature : ScriptableRendererFeature
|
||||
// {
|
||||
// [System.Serializable]
|
||||
// public class CRTSettings
|
||||
// {
|
||||
// public bool EffectEnabled = true;
|
||||
// public RenderPassEvent PassEvent = RenderPassEvent.AfterRenderingPostProcessing;
|
||||
// public Shader CRTShader;
|
||||
|
||||
// [Range(0f, 1f)] public float Intensity = 0.65f;
|
||||
// [Range(0f, 2f)] public float ScanlineDensity = 1.2f;
|
||||
// [Range(0f, 1f)] public float ScanlineStrength = 0.18f;
|
||||
// [Range(0f, 0.2f)] public float Curvature = 0.04f;
|
||||
// [Range(0f, 1f)] public float VignetteStrength = 0.28f;
|
||||
// [Range(0f, 0.05f)] public float ChromaticAberration = 0.004f;
|
||||
// [Range(0f, 0.2f)] public float NoiseStrength = 0.03f;
|
||||
// [Range(0f, 0.1f)] public float FlickerStrength = 0.015f;
|
||||
// }
|
||||
|
||||
// class CRTPass : ScriptableRenderPass
|
||||
// {
|
||||
// private Material m_Material;
|
||||
// private CRTSettings m_Settings;
|
||||
|
||||
// public void Setup(Material material, CRTSettings settings)
|
||||
// {
|
||||
// m_Material = material;
|
||||
// m_Settings = settings;
|
||||
// renderPassEvent = settings.PassEvent;
|
||||
// requiresIntermediateTexture = true;
|
||||
// }
|
||||
|
||||
// public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData)
|
||||
// {
|
||||
// if (m_Material == null || m_Settings == null || !m_Settings.EffectEnabled)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// UniversalResourceData resourceData = frameData.Get<UniversalResourceData>();
|
||||
// if (resourceData.isActiveTargetBackBuffer)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// m_Material.SetFloat("_Intensity", m_Settings.Intensity);
|
||||
// m_Material.SetFloat("_ScanlineDensity", m_Settings.ScanlineDensity);
|
||||
// m_Material.SetFloat("_ScanlineStrength", m_Settings.ScanlineStrength);
|
||||
// m_Material.SetFloat("_Curvature", m_Settings.Curvature);
|
||||
// m_Material.SetFloat("_VignetteStrength", m_Settings.VignetteStrength);
|
||||
// m_Material.SetFloat("_ChromaticAberration", m_Settings.ChromaticAberration);
|
||||
// m_Material.SetFloat("_NoiseStrength", m_Settings.NoiseStrength);
|
||||
// m_Material.SetFloat("_FlickerStrength", m_Settings.FlickerStrength);
|
||||
|
||||
// TextureHandle source = resourceData.activeColorTexture;
|
||||
// TextureDesc destinationDesc = renderGraph.GetTextureDesc(source);
|
||||
// destinationDesc.name = "CameraColor-CRT";
|
||||
// destinationDesc.clearBuffer = false;
|
||||
|
||||
// TextureHandle destination = renderGraph.CreateTexture(destinationDesc);
|
||||
// RenderGraphUtils.BlitMaterialParameters blitParams = new(source, destination, m_Material, 0);
|
||||
// renderGraph.AddBlitPass(blitParams, "CRT Effect");
|
||||
|
||||
// resourceData.cameraColor = destination;
|
||||
// }
|
||||
|
||||
// public void Dispose()
|
||||
// {
|
||||
// // RenderGraph path does not allocate persistent RTHandles in this pass.
|
||||
// }
|
||||
// }
|
||||
|
||||
// public CRTSettings Settings = new();
|
||||
|
||||
// private CRTPass m_Pass;
|
||||
// private Material m_Material;
|
||||
|
||||
// public override void Create()
|
||||
// {
|
||||
// if (Settings.CRTShader == null)
|
||||
// {
|
||||
// Settings.CRTShader = Shader.Find("Hidden/HeadlessHazard/CRT");
|
||||
// }
|
||||
|
||||
// if (Settings.CRTShader != null)
|
||||
// {
|
||||
// m_Material = CoreUtils.CreateEngineMaterial(Settings.CRTShader);
|
||||
// }
|
||||
|
||||
// m_Pass ??= new CRTPass();
|
||||
// }
|
||||
|
||||
// public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
|
||||
// {
|
||||
// if (m_Material == null || !Settings.EffectEnabled)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if (renderingData.cameraData.cameraType != CameraType.Game)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// m_Pass.Setup(m_Material, Settings);
|
||||
// renderer.EnqueuePass(m_Pass);
|
||||
// }
|
||||
|
||||
// protected override void Dispose(bool disposing)
|
||||
// {
|
||||
// m_Pass?.Dispose();
|
||||
// m_Pass = null;
|
||||
|
||||
// CoreUtils.Destroy(m_Material);
|
||||
// m_Material = null;
|
||||
// }
|
||||
// }
|
||||
11
Assets/Code/Scripts/Rendering/CRTRendererFeature.cs.meta
Normal file
11
Assets/Code/Scripts/Rendering/CRTRendererFeature.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f2de7a6cfbd47c8bc740d43bb991205
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Code/Scripts/UI.meta
Normal file
8
Assets/Code/Scripts/UI.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e88664529cd503644b2b92f055895969
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user