Compare commits
116 Commits
10c25d88a4
...
feat/fire-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4720db6a7 | ||
|
|
dc8d53a710 | ||
|
|
e9187351a6 | ||
|
|
4d4a54094e | ||
|
|
360b30370a | ||
|
|
af01c1ee76 | ||
|
|
6b3913fe2b | ||
|
|
203f3e548b | ||
|
|
94c28dca2f | ||
|
|
f120b487ec | ||
|
|
7f2c58f864 | ||
|
|
7a4f79ac6b | ||
|
|
14310f742f | ||
|
|
4a3f0ec740 | ||
|
|
2a5d8a0944 | ||
| cceee1df1b | |||
|
|
9926d6c24f | ||
| 3a758bb245 | |||
|
|
0554662c32 | ||
|
|
e42114602a | ||
|
|
f593bc2e20 | ||
|
|
cac96fd09f | ||
|
|
fcb0f813dd | ||
|
|
175162fccf | ||
|
|
cc82294cd9 | ||
|
|
280626bf6b | ||
|
|
bf59f9b2da | ||
|
|
9183a4e687 | ||
|
|
d0d5fccc37 | ||
| 66b8ea1c3f | |||
|
|
d906c93460 | ||
|
|
e3852c7f60 | ||
|
|
187c4fbf61 | ||
|
|
faf2f92521 | ||
|
|
ffa489db0d | ||
|
|
53fd617abe | ||
|
|
64b2d63799 | ||
|
|
f42463176f | ||
|
|
ab434be65f | ||
|
|
935b4c089a | ||
|
|
bf80659d7b | ||
|
|
4f19d135df | ||
|
|
2dbe21ec62 | ||
|
|
ceb4c54b9d | ||
|
|
7d7b288b4f | ||
|
|
e1d520e9fb | ||
|
|
efea27a503 | ||
|
|
4c9436ae74 | ||
|
|
44d3ef02a3 | ||
|
|
0892ac9de3 | ||
|
|
18a12a11a5 | ||
|
|
7daba4cb56 | ||
|
|
46c1094b7f | ||
|
|
43792c347e | ||
|
|
ee621dfc24 | ||
|
|
09acac00c7 | ||
|
|
e506bce879 | ||
|
|
08b051de1c | ||
|
|
8ed3a97669 | ||
|
|
4d5af9b60f | ||
|
|
66a8ca6e49 | ||
|
|
fb76786cf9 | ||
|
|
a28f6287be | ||
|
|
c3c487999d | ||
| 7a281dcb6c | |||
|
|
a9314979ad | ||
|
|
1dbc2734f3 | ||
|
|
67a1717b86 | ||
|
|
eee022fa5f | ||
|
|
bf59556985 | ||
|
|
4593b3714c | ||
|
|
530e9e0bd2 | ||
|
|
47dc0b3886 | ||
|
|
0fea90a480 | ||
|
|
22764e933b | ||
|
|
b98c72a10d | ||
|
|
de9ea88cd2 | ||
|
|
e92cbe1f4b | ||
|
|
421df26822 | ||
|
|
467dabc2f6 | ||
|
|
f4137c8b04 | ||
|
|
382e664b90 | ||
|
|
200209df9a | ||
|
|
fff812bd03 | ||
|
|
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 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -62,3 +62,5 @@ Thumbs.db.meta
|
||||
# VS Code
|
||||
*.vscode
|
||||
.vsconfig
|
||||
|
||||
Assets/Level/Scenes/DevRoom/Perso/
|
||||
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: Player
|
||||
- Tag: Player
|
||||
- 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
|
||||
8
Assets/Code/Scripts/Enemies.meta
Normal file
8
Assets/Code/Scripts/Enemies.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d82ed499bde37d2bca7590ba5952894f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Code/Scripts/Enemies/LivingRoot.meta
Normal file
8
Assets/Code/Scripts/Enemies/LivingRoot.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91ac6bdb3a3fc30fa9e96966372092e3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Code/Scripts/Enemies/LivingRoot/RootCrawler.meta
Normal file
8
Assets/Code/Scripts/Enemies/LivingRoot/RootCrawler.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd6d6893cb79bcda4bd1aebc58cdc64e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,56 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class RootCrawler : MonoBehaviour
|
||||
{
|
||||
public Transform target;
|
||||
public float maxHeight = 2f;
|
||||
public float crawlingSpeed = 0.4f;
|
||||
public float radius = 0.5f;
|
||||
public float rotationSpeed = 5f;
|
||||
public float noiseStrength = 0.06f;
|
||||
public float noiseFrequency = 1.5f;
|
||||
public int resolution = 80;
|
||||
|
||||
private float currentHeight = 0f;
|
||||
private float noiseOffset;
|
||||
private LineRenderer line;
|
||||
private float angleOffset = 0f;
|
||||
|
||||
void Start()
|
||||
{
|
||||
line = GetComponent<LineRenderer>();
|
||||
noiseOffset = Random.Range(0f, 100f);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (target == null)
|
||||
return;
|
||||
|
||||
currentHeight += Time.deltaTime * crawlingSpeed;
|
||||
currentHeight = Mathf.Clamp(currentHeight, 0f, maxHeight);
|
||||
|
||||
angleOffset += Time.deltaTime * 2f;
|
||||
|
||||
int currentResolution = Mathf.Max(2, Mathf.RoundToInt((currentHeight / maxHeight) * resolution));
|
||||
line.positionCount = currentResolution;
|
||||
|
||||
for (int i = 0; i < currentResolution; i++) {
|
||||
float t = (float)i / (currentResolution - 1);
|
||||
float h = t * currentHeight;
|
||||
float angle = t * rotationSpeed * maxHeight / crawlingSpeed + angleOffset;
|
||||
|
||||
float r = Mathf.Lerp(radius, radius * 0.5f, t);
|
||||
|
||||
float noiseX = (Mathf.PerlinNoise(noiseOffset + h * noiseFrequency, 0f) - 0.5f) * noiseStrength;
|
||||
float noiseZ = (Mathf.PerlinNoise(0f, noiseOffset + h * noiseFrequency) - 0.5f) * noiseStrength;
|
||||
|
||||
float x = Mathf.Cos(angle) * r + noiseX;
|
||||
float z = Mathf.Sin(angle) * r + noiseZ;
|
||||
|
||||
line.SetPosition(i, target.position + new Vector3(x, h - 0.8f, z));
|
||||
}
|
||||
float rotationMultiplier = 1f - (currentHeight / maxHeight);
|
||||
angleOffset += Time.deltaTime * 2f * (rotationMultiplier + 0.1f);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32b713897b19bfd9fbc1d58800761b20
|
||||
63
Assets/Code/Scripts/Enemies/LivingRoot/SlowdownArea.cs
Normal file
63
Assets/Code/Scripts/Enemies/LivingRoot/SlowdownArea.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SlowdownArea : MonoBehaviour
|
||||
{
|
||||
|
||||
[Header("References")]
|
||||
public float maxSlow;
|
||||
public float slowSpeed;
|
||||
public float timer;
|
||||
public GameObject playerBody;
|
||||
|
||||
[Header("Root Crawler")]
|
||||
public GameObject rootCrawlerPrefab;
|
||||
|
||||
private float baseJump;
|
||||
private bool isInZone = false;
|
||||
private PlayerMovement player;
|
||||
private PlayerJump jump;
|
||||
private GameObject currentCrawler;
|
||||
|
||||
private void OnTriggerEnter(Collider area)
|
||||
{
|
||||
if (area.CompareTag("Player")){
|
||||
player = area.GetComponent<PlayerMovement>();
|
||||
jump = area.GetComponent<PlayerJump>();
|
||||
baseJump = 5.0f;
|
||||
jump.JumpForce = 1.5f;
|
||||
isInZone = true;
|
||||
if (currentCrawler == null) {
|
||||
currentCrawler = Instantiate(rootCrawlerPrefab, player.transform);
|
||||
RootCrawler crawler = currentCrawler.GetComponent<RootCrawler>();
|
||||
crawler.target = playerBody.transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit(Collider area)
|
||||
{
|
||||
if (area.CompareTag("Player")) {
|
||||
isInZone = false;
|
||||
timer = 0f;
|
||||
player.ApplySlow(1f);
|
||||
player.ApplyAnimationSlow(1f);
|
||||
jump.JumpForce = baseJump;
|
||||
if (currentCrawler != null) {
|
||||
Destroy(currentCrawler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (!isInZone || player == null)
|
||||
return;
|
||||
timer += Time.deltaTime;
|
||||
float t = Mathf.Clamp(timer * slowSpeed, 0f, 1f);
|
||||
float multiplicator = Mathf.Lerp(1f, maxSlow, t);
|
||||
player.ApplySlow(multiplicator);
|
||||
player.ApplyAnimationSlow(multiplicator);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbfa6ebdeb68bf2f6a5c4d25311b5811
|
||||
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
|
||||
72
Assets/Code/Scripts/Interaction/PlayerBoxController.cs
Normal file
72
Assets/Code/Scripts/Interaction/PlayerBoxController.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class BoxPickup : MonoBehaviour
|
||||
{
|
||||
public Transform PlayerTransform;
|
||||
public Transform CameraTransform;
|
||||
public Transform HandTransform;
|
||||
public float ThrowForce = 10f;
|
||||
public float PickupDistance = 5f;
|
||||
|
||||
private bool isHeld;
|
||||
private Rigidbody m_rigidbody;
|
||||
private PlayerInputController input;
|
||||
|
||||
void Start()
|
||||
{
|
||||
m_rigidbody = GetComponent<Rigidbody>();
|
||||
input = PlayerTransform.GetComponent<PlayerInputController>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (input.InteractPressed)
|
||||
{
|
||||
if (!isHeld)
|
||||
TryPickup();
|
||||
else
|
||||
Drop();
|
||||
}
|
||||
|
||||
if (input.ThrowPressed)
|
||||
Throw();
|
||||
}
|
||||
|
||||
private void TryPickup()
|
||||
{
|
||||
Collider[] hits = Physics.OverlapSphere(PlayerTransform.position, PickupDistance);
|
||||
|
||||
foreach (Collider hit in hits)
|
||||
{
|
||||
if (hit.transform == transform) {
|
||||
Pickup();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Pickup()
|
||||
{
|
||||
isHeld = true;
|
||||
m_rigidbody.isKinematic = true;
|
||||
transform.SetParent(HandTransform);
|
||||
transform.localPosition = Vector3.zero;
|
||||
transform.localRotation = Quaternion.identity;
|
||||
}
|
||||
|
||||
private void Drop()
|
||||
{
|
||||
isHeld = false;
|
||||
transform.SetParent(null);
|
||||
m_rigidbody.isKinematic = false;
|
||||
}
|
||||
|
||||
private void Throw()
|
||||
{
|
||||
if (!isHeld)
|
||||
return;
|
||||
|
||||
Drop();
|
||||
m_rigidbody.AddForce(PlayerTransform.forward * ThrowForce, ForceMode.Impulse);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a36af2e55a3732eb2abc110ae2365702
|
||||
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
|
||||
}
|
||||
|
||||
155
Assets/Code/Scripts/Player/PlayerHeadControll.cs
Normal file
155
Assets/Code/Scripts/Player/PlayerHeadControll.cs
Normal file
@@ -0,0 +1,155 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerHeadController : MonoBehaviour
|
||||
{
|
||||
[Header("Head")]
|
||||
public Transform Head;
|
||||
public Transform CameraTransform;
|
||||
public Transform BodyTransform;
|
||||
public float ThrowForce;
|
||||
public float PickupDistance;
|
||||
public bool isHoldingHead;
|
||||
|
||||
[Header("Grabbable")]
|
||||
public Transform HandTransform; // in the future hand maybe grab items but for now its an empty object
|
||||
public float ItemThrowForce = 10f;
|
||||
public float ItemPickupDistance = 5f;
|
||||
|
||||
private bool isHoldingItem;
|
||||
private Rigidbody m_itemRigidbody;
|
||||
private Collider m_itemCollider;
|
||||
private Transform m_currentItem;
|
||||
|
||||
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 && isHoldingHead)
|
||||
ThrowHead();
|
||||
|
||||
if (input.InteractPressed)
|
||||
{
|
||||
if (!isHoldingItem)
|
||||
TryPickupItem();
|
||||
else
|
||||
DropItem();
|
||||
}
|
||||
if (input.ThrowPressed && isHoldingItem)
|
||||
ThrowItem();
|
||||
}
|
||||
|
||||
private void InteractHead()
|
||||
{
|
||||
if (!isHoldingHead)
|
||||
TryPickupHead();
|
||||
else
|
||||
DropHead();
|
||||
}
|
||||
|
||||
private void TryPickupHead()
|
||||
{
|
||||
if (isHoldingHead || isHoldingItem)
|
||||
return;
|
||||
if (Vector3.Distance(transform.position, Head.position) <= PickupDistance)
|
||||
PickupHead();
|
||||
}
|
||||
|
||||
private void PickupHead()
|
||||
{
|
||||
isHoldingHead = true;
|
||||
|
||||
if (m_headRigidbody != null)
|
||||
Destroy(m_headRigidbody);
|
||||
|
||||
Head.SetParent(transform);
|
||||
Head.localPosition = m_headInitialLocalPos;
|
||||
Head.localRotation = m_headInitialLocalRot;
|
||||
}
|
||||
private void 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()
|
||||
{
|
||||
DropHead();
|
||||
m_headRigidbody.AddForce(CameraTransform.forward * ThrowForce, ForceMode.Impulse);
|
||||
}
|
||||
private void TryPickupItem()
|
||||
{
|
||||
if (isHoldingHead || isHoldingItem)
|
||||
return;
|
||||
int grabbableLayer = LayerMask.GetMask("Grabbable");
|
||||
Collider[] hits = Physics.OverlapSphere(transform.position, ItemPickupDistance, grabbableLayer);
|
||||
|
||||
foreach (Collider hit in hits)
|
||||
{
|
||||
m_currentItem = hit.transform;
|
||||
m_itemRigidbody = hit.GetComponent<Rigidbody>();
|
||||
m_itemCollider = hit.GetComponent<Collider>();
|
||||
PickupItem();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void PickupItem()
|
||||
{
|
||||
isHoldingItem = true;
|
||||
m_itemRigidbody.isKinematic = true;
|
||||
m_itemCollider.enabled = false;
|
||||
|
||||
m_currentItem.SetParent(HandTransform);
|
||||
m_currentItem.localPosition = Vector3.zero;
|
||||
m_currentItem.localRotation = Quaternion.identity;
|
||||
}
|
||||
|
||||
private void DropItem()
|
||||
{
|
||||
isHoldingItem = false;
|
||||
m_currentItem.SetParent(null);
|
||||
m_itemRigidbody.isKinematic = false;
|
||||
m_itemCollider.enabled = true;
|
||||
m_currentItem = null;
|
||||
}
|
||||
|
||||
private void ThrowItem()
|
||||
{
|
||||
DropItem();
|
||||
m_itemRigidbody.AddForce(BodyTransform.forward * ItemThrowForce, ForceMode.Impulse);
|
||||
}
|
||||
}
|
||||
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
|
||||
80
Assets/Code/Scripts/Player/PlayerInputHandler.cs
Normal file
80
Assets/Code/Scripts/Player/PlayerInputHandler.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
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_interactAction;
|
||||
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 InteractPressed { 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_interactAction = map.FindAction("Interact");
|
||||
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;
|
||||
InteractPressed = 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();
|
||||
InteractPressed = m_interactAction.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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user