First PlayerActionEvent Pass (#202)

* update blue bear to use PlayerActionEvent

* update built to scale DS to use PlayerActionEvent

* update clappy trio to use PlayerActionEvent

* update crop stomp to use PlayerActionEvent

* update drumming practice to use PlayerActionEvent

* update fork lifter to use PlayerActionEvent

* update minigame icons

* update wizard waltz' icon
This commit is contained in:
minenice55 2023-01-14 23:33:37 -05:00 committed by GitHub
parent 0115333d8b
commit 330c538947
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 1295 additions and 378 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 490 KiB

View file

@ -65,7 +65,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0
@ -77,7 +77,7 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
buildTarget: Standalone buildTarget: Standalone
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: cae460600d16be4408fc25403e34a9d8 guid: 894e99a28a66992488bc27246c7bf042
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
@ -65,10 +65,22 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e27e2aae1f847a747be04f97ea823899 guid: c2f7c3c1d7cf40147917fcaefc77dd91
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
@ -65,10 +65,22 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: cdee2276cf3cb364eb1c5ee0f0e38573
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 554 KiB

View file

@ -68,7 +68,7 @@ TextureImporter:
maxTextureSize: 256 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 0
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
@ -80,7 +80,7 @@ TextureImporter:
maxTextureSize: 256 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 0
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 496 KiB

View file

@ -65,7 +65,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0
@ -77,7 +77,7 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
buildTarget: Standalone buildTarget: Standalone
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 0080a91e5366c334da5a829fda89c32e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 9542c3385961e8340bd082c10f739211
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 2343af644f3d99840967a6c0a320488c
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 500 KiB

View file

@ -65,7 +65,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0
@ -77,7 +77,7 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
buildTarget: Standalone buildTarget: Standalone
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 55959685c1d851240bbd5f754908fb3d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 100 KiB

View file

@ -65,7 +65,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0
@ -77,7 +77,7 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
buildTarget: Standalone buildTarget: Standalone
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 842b97bd52929304d9ac3d098b5dda5e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 602 KiB

View file

@ -65,10 +65,10 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 128 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 0
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
@ -77,10 +77,10 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
buildTarget: Standalone buildTarget: Standalone
maxTextureSize: 128 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 0
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: b7c0c13501cdaf347824e75bff542878
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -65,7 +65,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0
@ -77,7 +77,7 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
buildTarget: Standalone buildTarget: Standalone
maxTextureSize: 64 maxTextureSize: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 0 textureCompression: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 148e6f16103322d4e9f6f9be1cad50ea
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -265,6 +265,23 @@ namespace HeavenStudio
return GameManager.instance.Beatmap.tempoChanges; return GameManager.instance.Beatmap.tempoChanges;
} }
public float GetBpmAtBeat(float beat)
{
var chart = GameManager.instance.Beatmap;
float bpm = chart.bpm;
foreach (DynamicBeatmap.TempoChange t in GameManager.instance.Beatmap.tempoChanges)
{
if (t.beat > beat)
{
break;
}
bpm = t.tempo;
}
return bpm;
}
public double GetSongPosFromBeat(double beat) public double GetSongPosFromBeat(double beat)
{ {
var chart = GameManager.instance.Beatmap; var chart = GameManager.instance.Beatmap;
@ -292,11 +309,11 @@ namespace HeavenStudio
} }
//thank you @wooningcharithri#7419 for the psuedo-code //thank you @wooningcharithri#7419 for the psuedo-code
private double BeatsToSecs(double beats, float bpm) public double BeatsToSecs(double beats, float bpm)
{ {
return beats / bpm * 60f; return beats / bpm * 60f;
} }
private double SecsToBeats(double s, float bpm) public double SecsToBeats(double s, float bpm)
{ {
return s / 60f * bpm; return s / 60f * bpm;
} }

View file

@ -68,11 +68,11 @@ namespace HeavenStudio.Games
{ {
headAndBodyAnim.SetBool("ShouldOpenMouth", foodHolder.childCount != 0); headAndBodyAnim.SetBool("ShouldOpenMouth", foodHolder.childCount != 0);
if (PlayerInput.GetAnyDirectionDown()) if (PlayerInput.GetAnyDirectionDown() && !IsExpectingInputNow(InputType.DIRECTION_DOWN))
{ {
headAndBodyAnim.Play("BiteL", 0, 0); headAndBodyAnim.Play("BiteL", 0, 0);
} }
else if (PlayerInput.Pressed()) else if (PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN))
{ {
headAndBodyAnim.Play("BiteR", 0, 0); headAndBodyAnim.Play("BiteR", 0, 0);
} }

View file

@ -25,8 +25,12 @@ namespace HeavenStudio.Games.Scripts_BlueBear
private void Awake() private void Awake()
{ {
game = BlueBear.instance; game = BlueBear.instance;
}
private void Start()
{
flyBeats = isCake ? 3f : 2f; flyBeats = isCake ? 3f : 2f;
game.ScheduleInput(startBeat, flyBeats, isCake ? InputType.DIRECTION_DOWN : InputType.STANDARD_DOWN, Just, Out, Out);
} }
private void Update() private void Update()
@ -47,46 +51,9 @@ namespace HeavenStudio.Games.Scripts_BlueBear
float rot = isCake ? rotSpeed : -rotSpeed; float rot = isCake ? rotSpeed : -rotSpeed;
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (rot * Time.deltaTime)); transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (rot * Time.deltaTime));
float normalizedBeat = cond.GetPositionFromMargin(startBeat + flyBeats, 1f);
StateCheck(normalizedBeat);
if (PlayerInput.Pressed())
{
if (!isCake)
{
if (state.perfect)
{
flying = false;
Jukebox.PlayOneShotGame("blueBear/chompDonut");
SpawnCrumbs();
GameObject.Destroy(gameObject);
} }
} }
} void EatFood()
else if (PlayerInput.GetAnyDirection())
{
if (isCake)
{
if (state.perfect)
{
flying = false;
Jukebox.PlayOneShotGame("blueBear/chompCake");
SpawnCrumbs();
GameObject.Destroy(gameObject);
}
}
}
}
}
public override void OnAce()
{ {
flying = false; flying = false;
@ -106,6 +73,26 @@ namespace HeavenStudio.Games.Scripts_BlueBear
GameObject.Destroy(gameObject); GameObject.Destroy(gameObject);
} }
private void Just(PlayerActionEvent caller, float state)
{
if (state >= 1f || state <= -1f) { //todo: proper near miss feedback
if (isCake)
{
game.headAndBodyAnim.Play("BiteL", 0, 0);
}
else
{
game.headAndBodyAnim.Play("BiteR", 0, 0);
}
return;
}
EatFood();
}
private void Miss(PlayerActionEvent caller) {}
private void Out(PlayerActionEvent caller) {}
void SpawnCrumbs() void SpawnCrumbs()
{ {
var crumbsGO = GameObject.Instantiate(game.crumbsBase, game.crumbsHolder); var crumbsGO = GameObject.Instantiate(game.crumbsBase, game.crumbsHolder);

View file

@ -14,60 +14,74 @@ namespace HeavenStudio.Games.Scripts_BuiltToScaleDS
private bool moving = true; private bool moving = true;
private BuiltToScaleDS game; private BuiltToScaleDS game;
float windupBeat;
float hitBeat;
float sinkBeat;
private void Awake() private void Awake()
{ {
game = BuiltToScaleDS.instance; game = BuiltToScaleDS.instance;
}
private void Start()
{
windupBeat = createBeat + (createLength * 4f);
hitBeat = windupBeat + createLength;
sinkBeat = hitBeat + (createLength * 2f);
game.ScheduleInput(windupBeat, createLength, InputType.STANDARD_DOWN, Just, Miss, Out);
} }
private void Update() private void Update()
{ {
if (!moving) return; if (!moving) return;
float currentBeat = Conductor.instance.songPositionInBeats;
var windupBeat = createBeat + (createLength * 4f);
var hitBeat = windupBeat + createLength;
var currentBeat = Conductor.instance.songPositionInBeats;
var shooterState = game.shooterAnim.GetCurrentAnimatorStateInfo(0); var shooterState = game.shooterAnim.GetCurrentAnimatorStateInfo(0);
if (currentBeat > windupBeat && currentBeat < hitBeat if (currentBeat > windupBeat && currentBeat < hitBeat
&& !shooterState.IsName("Windup") && !shooterState.IsName("Windup")
&& game.shooterAnim.IsAnimationNotPlaying()) && !game.lastShotOut)
{ {
game.shooterAnim.Play("Windup", 0, 0); game.shooterAnim.Play("Windup", 0, 0);
} }
float stateBeat = Conductor.instance.GetPositionFromMargin(hitBeat, 2f); if (moving && currentBeat < sinkBeat)
StateCheck(stateBeat);
if (PlayerInput.Pressed())
{
if (state.perfect)
{
Ace();
}
else if (state.notPerfect())
{
Miss();
}
}
if (moving)
{
var sinkBeat = hitBeat + (createLength * 2f);
if (currentBeat < sinkBeat)
{
game.SetBlockTime(this, createBeat, createLength); game.SetBlockTime(this, createBeat, createLength);
} }
else
private void Just(PlayerActionEvent caller, float state)
{ {
moving = false; var shooterState = game.shooterAnim.GetCurrentAnimatorStateInfo(0);
Jukebox.PlayOneShotGame("builtToScaleDS/Sink"); if (!shooterState.IsName("Windup")) return;
}
// near miss
if (state >= 1f || state <= -1f) {
NearMiss();
return;
} }
// hit
Hit();
} }
void Ace() private void Miss(PlayerActionEvent caller)
{
float sinkBeat = hitBeat + (createLength * 2f);
MultiSound.Play(
new MultiSound.Sound[] {
new MultiSound.Sound("builtToScaleDS/Sink", sinkBeat),
}, forcePlay: true
);
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(sinkBeat, delegate { moving = false; }),
});
}
private void Out(PlayerActionEvent caller) {}
void Hit()
{ {
moving = false; moving = false;
game.shootingThisFrame = true; game.shootingThisFrame = true;
@ -79,7 +93,7 @@ namespace HeavenStudio.Games.Scripts_BuiltToScaleDS
Jukebox.PlayOneShotGame("builtToScaleDS/Hit"); Jukebox.PlayOneShotGame("builtToScaleDS/Hit");
} }
void Miss() void NearMiss()
{ {
moving = false; moving = false;
game.shootingThisFrame = true; game.shootingThisFrame = true;
@ -90,10 +104,5 @@ namespace HeavenStudio.Games.Scripts_BuiltToScaleDS
Jukebox.PlayOneShotGame("builtToScaleDS/Crumble"); Jukebox.PlayOneShotGame("builtToScaleDS/Crumble");
} }
public override void OnAce()
{
Ace();
}
} }
} }

View file

@ -65,6 +65,7 @@ namespace HeavenStudio.Games
private float currentBeltOffset; private float currentBeltOffset;
[NonSerialized] public bool shootingThisFrame; [NonSerialized] public bool shootingThisFrame;
[NonSerialized] public bool lastShotOut = false;
public static BuiltToScaleDS instance; public static BuiltToScaleDS instance;
@ -118,10 +119,14 @@ namespace HeavenStudio.Games
void LateUpdate() void LateUpdate()
{ {
var shooterState = shooterAnim.GetCurrentAnimatorStateInfo(0); var shooterState = shooterAnim.GetCurrentAnimatorStateInfo(0);
bool canShoot = !shooterState.IsName("Shoot") || shooterAnim.IsAnimationNotPlaying(); bool canShoot = (!shooterState.IsName("Shoot") || shooterAnim.IsAnimationNotPlaying()) && !shootingThisFrame;
if (canShoot && PlayerInput.Pressed() && !shootingThisFrame) if (canShoot && lastShotOut)
lastShotOut = false;
if (canShoot && !lastShotOut && PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN))
{ {
lastShotOut = true;
shootingThisFrame = true; shootingThisFrame = true;
Shoot(); Shoot();
SpawnObject(BTSObject.FlyingRod); SpawnObject(BTSObject.FlyingRod);

View file

@ -72,9 +72,13 @@ namespace HeavenStudio.Games
public static ClappyTrio instance { get; set; } public static ClappyTrio instance { get; set; }
MultiSound clapSounds = null;
BeatAction clapAction = null;
private void Awake() private void Awake()
{ {
instance = this; instance = this;
clapSounds = null;
InitLions(); InitLions();
} }
public override void OnGameSwitch(float beat) public override void OnGameSwitch(float beat)
@ -108,52 +112,16 @@ namespace HeavenStudio.Games
ClappyTrioPlayer = lion.AddComponent<ClappyTrioPlayer>(); ClappyTrioPlayer = lion.AddComponent<ClappyTrioPlayer>();
} }
if (clapSounds != null)
clapSounds.Delete();
if (clapAction != null)
clapAction.Delete();
} }
private void Update() private void Update()
{ {
if (isClapping)
{
float songPosBeat = Conductor.instance.songPositionInBeats;
for (int i = 0; i < Lion.Count; i++)
{
float length = currentClappingLength * (i);
float lengthplusone = (currentClappingLength * (i + 1));
// i spent like 25 minutes trying to figure out what was wrong with this when i forgot to subtract the currentClapLength :(
if (i == Lion.Count - 1)
{
length = 0;
}
if (songPosBeat > lastClapStart + length && songPosBeat < lastClapStart + lengthplusone && clapIndex == i)
{
if (i == Lion.Count - 1)
{
ClappyTrioPlayer.SetClapAvailability(lastClapStart + (currentClappingLength * (i - 1)), currentClappingLength);
clapIndex = 0;
isClapping = false;
currentClappingLength = 0;
ClappyTrioPlayer.clapStarted = false;
} else
{
SetFace(i, 4);
Lion[i].GetComponent<Animator>().Play("Clap", 0, 0);
// lazy fix rn
if (i > 0)
Jukebox.PlayOneShotGame("clappyTrio/middleClap");
else
Jukebox.PlayOneShotGame("clappyTrio/leftClap");
clapIndex++;
}
break;
}
}
}
} }
public void Clap(float beat, float length) public void Clap(float beat, float length)
@ -163,8 +131,21 @@ namespace HeavenStudio.Games
playerHitLast = false; playerHitLast = false;
isClapping = true; isClapping = true;
lastClapStart = beat;
currentClappingLength = length; // makes the other lions clap
List<MultiSound.Sound> sounds = new List<MultiSound.Sound>();
List<BeatAction.Action> actions = new List<BeatAction.Action>();
for (int i = 0; i < Lion.Count - 1; i++)
{
int idx = i;
sounds.Add(new MultiSound.Sound((i > 0) ? "clappyTrio/middleClap" : "clappyTrio/leftClap", beat + (length * i)));
actions.Add(new BeatAction.Action(beat + (length * i), delegate { SetFace(idx, 4); Lion[idx].GetComponent<Animator>().Play("Clap", 0, 0);}));
}
clapSounds = MultiSound.Play(sounds.ToArray());
clapAction = BeatAction.New(this.gameObject, actions);
// prepare player input
ClappyTrioPlayer.QueueClap(beat, length * (Lion.Count - 1));
} }
public void Prepare(int type) public void Prepare(int type)

View file

@ -8,84 +8,81 @@ namespace HeavenStudio.Games.Scripts_ClappyTrio
{ {
public class ClappyTrioPlayer : PlayerActionObject public class ClappyTrioPlayer : PlayerActionObject
{ {
ClappyTrio game;
private float lastClapBeat; private float lastClapBeat;
private float lastClapLength; private float lastClapLength;
[SerializeField] private bool clapVacant;
public bool clapStarted = false; public bool clapStarted = false;
public bool canHit; public bool canHit;
private GameObject clapEffect; private GameObject clapEffect;
new int aceTimes = 0;
private void Awake() private void Awake()
{ {
game = ClappyTrio.instance;
clapEffect = transform.GetChild(4).GetChild(3).gameObject; clapEffect = transform.GetChild(4).GetChild(3).gameObject;
} }
public override void OnAce()
{
if (aceTimes == 0)
{
Clap(true);
aceTimes++;
}
}
private void Update() private void Update()
{ {
if (clapVacant == true) if (PlayerInput.Pressed() && !game.IsExpectingInputNow(InputType.STANDARD_DOWN))
{
float normalizedBeat = (Conductor.instance.GetPositionFromBeat(lastClapBeat, lastClapLength));
StateCheck(normalizedBeat);
if (normalizedBeat > Minigame.EndTime())
{
clapVacant = false;
lastClapLength = 0;
lastClapBeat = 0;
}
}
if (PlayerInput.Pressed())
{ {
Clap(false); Clap(false);
} }
} }
public void SetClapAvailability(float startBeat, float length) public void QueueClap(float startBeat, float length)
{ {
aceTimes = 0;
lastClapBeat = startBeat; lastClapBeat = startBeat;
clapVacant = true;
lastClapLength = length; lastClapLength = length;
ResetState(); game.ScheduleInput(startBeat, length, InputType.STANDARD_DOWN, Just, Miss, Out);
} }
private void Clap(bool overrideCanHit) private void Just(PlayerActionEvent caller, float state)
{ {
if (state.early || state.perfect || overrideCanHit) if (!canHit) {
{ Clap(false);
clapEffect.SetActive(true); return;
Jukebox.PlayOneShotGame("clappyTrio/rightClap");
if (this.canHit)
ClappyTrio.instance.playerHitLast = true;
} }
else if (state >= 1f || state <= -1f) { //todo: proper near miss feedback
{ Clap(false);
clapEffect.SetActive(false); return;
Jukebox.PlayOneShot("miss"); }
ClappyTrio.instance.playerHitLast = false; Clap(true);
}
private void Miss(PlayerActionEvent caller) {
game.playerHitLast = false;
if (clapStarted) if (clapStarted)
this.canHit = false; this.canHit = false;
} }
ClappyTrio.instance.SetFace(ClappyTrio.instance.Lion.Count - 1, 4); private void Out(PlayerActionEvent caller) {}
private void Clap(bool just)
{
if (just)
{
clapEffect.SetActive(true);
Jukebox.PlayOneShotGame("clappyTrio/rightClap");
if (this.canHit)
game.playerHitLast = true;
}
else
{
clapEffect.SetActive(false);
Jukebox.PlayOneShot("miss");
game.playerHitLast = false;
if (clapStarted)
this.canHit = false;
}
clapStarted = false;
game.SetFace(game.Lion.Count - 1, 4);
this.GetComponent<Animator>().Play("Clap", 0, 0); this.GetComponent<Animator>().Play("Clap", 0, 0);
} }
} }

View file

@ -130,7 +130,7 @@ namespace HeavenStudio.Games
// Cue the marching proper to begin when applicable. // Cue the marching proper to begin when applicable.
BeatAction.New(gameObject, new List<BeatAction.Action>() BeatAction.New(gameObject, new List<BeatAction.Action>()
{ {
new BeatAction.Action(startBeat, delegate { StartMarching(startBeat); }) new BeatAction.Action(startBeat - 0.25f, delegate { StartMarching(startBeat); })
}); });
inactiveStart = -1f; inactiveStart = -1f;
@ -208,7 +208,7 @@ namespace HeavenStudio.Games
PlayAnims(); PlayAnims();
if (currentMarchBeat % 2 != 0) //step sound if (currentMarchBeat % 2 != 0) //step sound
{ {
Jukebox.PlayOneShotGame("cropStomp/hmm"); MultiSound.Play(new MultiSound.Sound[] {new MultiSound.Sound("cropStomp/hmm", newBeat + marchOffset)});
} }
} }

View file

@ -12,6 +12,8 @@ namespace HeavenStudio.Games.Scripts_CropStomp
private CropStomp game; private CropStomp game;
PlayerActionEvent stomp;
public void Init() public void Init()
{ {
game = CropStomp.instance; game = CropStomp.instance;
@ -21,38 +23,56 @@ namespace HeavenStudio.Games.Scripts_CropStomp
{ {
if (!game.isMarching) if (!game.isMarching)
return; return;
Conductor cond = Conductor.instance;
float normalizedBeat = Conductor.instance.GetPositionFromMargin(nextStompBeat, 1f); if (stomp == null)
StateCheck(normalizedBeat);
if (normalizedBeat > Minigame.LateTime())
{ {
nextStompBeat += 2f; if (GameManager.instance.currentGame == "cropStomp")
ResetState(); stomp = game.ScheduleUserInput(nextStompBeat - 1f, 1f, InputType.STANDARD_DOWN, Just, Miss, Out);
return;
} }
if (PlayerInput.Pressed()) if (PlayerInput.Pressed() && !game.IsExpectingInputNow(InputType.STANDARD_DOWN))
{
if (state.perfect)
{
game.Stomp();
game.bodyAnim.Play("Stomp", 0, 0);
nextStompBeat += 2f;
ResetState();
}
else if (state.notPerfect())
{ {
game.bodyAnim.Play("Crouch", 0, 0); game.bodyAnim.Play("Crouch", 0, 0);
}
}
private void Just(PlayerActionEvent caller, float state)
{
// REMARK: does not count for performance
Stomp(state >= 1f || state <= -1f);
}
private void Miss(PlayerActionEvent caller)
{
if (GameManager.instance.currentGame != "cropStomp") return;
if (!game.isMarching)
return;
// REMARK: does not count for performance
nextStompBeat += 2f; nextStompBeat += 2f;
ResetState(); stomp?.Disable();
stomp = game.ScheduleUserInput(nextStompBeat - 1f, 1f, InputType.STANDARD_DOWN, Just, Miss, Out);
}
private void Out(PlayerActionEvent caller) {}
void Stomp(bool ng)
{
if (GameManager.instance.currentGame != "cropStomp") return;
if (!game.isMarching)
return;
if (ng)
{
game.bodyAnim.Play("Crouch", 0, 0);
} }
else else
{ {
game.bodyAnim.Play("Crouch", 0, 0); game.Stomp();
} game.bodyAnim.Play("Stomp", 0, 0);
} }
nextStompBeat += 2f;
stomp?.Disable();
stomp = game.ScheduleUserInput(nextStompBeat - 1f, 1f, InputType.STANDARD_DOWN, Just, Miss, Out);
} }
} }
} }

View file

@ -26,6 +26,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp
private float pickTime = 1f; private float pickTime = 1f;
private int veggieState = 0; private int veggieState = 0;
private bool boinked; // Player got barely when trying to pick. private bool boinked; // Player got barely when trying to pick.
private bool pickEligible = true;
private float landBeat; private float landBeat;
@ -36,6 +37,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp
public void Init() public void Init()
{ {
game = CropStomp.instance; game = CropStomp.instance;
game.ScheduleInput(targetBeat - 1, 1f, InputType.STANDARD_DOWN, StompJust, StompMiss, Out);
if (!isMole) if (!isMole)
{ {
@ -68,30 +70,9 @@ namespace HeavenStudio.Games.Scripts_CropStomp
} }
var cond = Conductor.instance; var cond = Conductor.instance;
float normalizedBeat = cond.GetPositionFromMargin(targetBeat, 1f);
StateCheck(normalizedBeat);
// In ground. // In ground.
if (veggieState == 0) if (veggieState == 0)
{ {
if (normalizedBeat > Minigame.LateTime())
{
veggieState = -1;
return;
}
if (PlayerInput.Pressed())
{
if (state.perfect)
{
StompVeggie(false);
}
else if (state.notPerfect())
{
veggieState = -1;
}
}
} }
// In air. // In air.
else if (veggieState == 1) else if (veggieState == 1)
@ -99,23 +80,47 @@ namespace HeavenStudio.Games.Scripts_CropStomp
float airPosition = cond.GetPositionFromBeat(stompedBeat, landBeat - stompedBeat); float airPosition = cond.GetPositionFromBeat(stompedBeat, landBeat - stompedBeat);
veggieTrans.position = curve.GetPoint(Mathf.Clamp(airPosition, 0, 1)); veggieTrans.position = curve.GetPoint(Mathf.Clamp(airPosition, 0, 1));
if (normalizedBeat > Minigame.EndTime()) if (PlayerInput.PressedUp() && !game.IsExpectingInputNow(InputType.STANDARD_UP))
{ {
veggieState = -1; pickEligible = false;
}
if (!isMole) }
Jukebox.PlayOneShotGame("cropStomp/veggieMiss"); }
private void StompJust(PlayerActionEvent caller, float state)
{
if (GameManager.instance.autoplay)
{
StompVeggie(true);
return; return;
} }
if (PlayerInput.PressedUp()) if (state >= 1f)
{ veggieState = -1;
if (state.perfect) else if (state > -1f)
{ StompVeggie(false);
PickVeggie(false);
} }
else if (state.notPerfect())
private void StompMiss(PlayerActionEvent caller)
{
veggieState = -1;
caller.Disable();
}
private void Out(PlayerActionEvent caller) {}
private void PickJust(PlayerActionEvent caller, float state)
{
game.bodyAnim.Play("Pick", 0, 0);
game.isFlicking = true;
if (!pickEligible) return;
if (GameManager.instance.autoplay)
{
PickVeggie(true);
return;
}
if (state <= -1f || state >= 1f)
{ {
veggieState = -1; veggieState = -1;
boinked = true; boinked = true;
@ -130,17 +135,25 @@ namespace HeavenStudio.Games.Scripts_CropStomp
var key2Pos = key2.Position; var key2Pos = key2.Position;
key2.Position = new Vector3(key2Pos.x, veggieTrans.position.y + 2f, key2Pos.z); key2.Position = new Vector3(key2Pos.x, veggieTrans.position.y + 2f, key2Pos.z);
pickedBeat = cond.songPositionInBeats; pickedBeat = Conductor.instance.songPositionInBeats;
Jukebox.PlayOneShot("miss"); Jukebox.PlayOneShot("miss");
MissedUpdate(); MissedUpdate();
} }
else
{
PickVeggie(false);
}
}
game.bodyAnim.Play("Pick", 0, 0); private void PickMiss(PlayerActionEvent caller)
game.isFlicking = true; {
} veggieState = -1;
}
if (!isMole)
Jukebox.PlayOneShotGame("cropStomp/veggieMiss");
caller.Disable();
} }
bool moleLaughing; bool moleLaughing;
@ -205,11 +218,12 @@ namespace HeavenStudio.Games.Scripts_CropStomp
var cond = Conductor.instance; var cond = Conductor.instance;
veggieState = 1; veggieState = 1;
game.ScheduleInput(targetBeat, isMole ? 0.5f : 1f, InputType.STANDARD_UP, PickJust, PickMiss, Out);
targetBeat = targetBeat + (isMole ? 0.5f : 1f); targetBeat = targetBeat + (isMole ? 0.5f : 1f);
stompedBeat = cond.songPositionInBeats; stompedBeat = cond.songPositionInBeats;
landBeat = cond.GetBeatFromPositionAndMargin(Minigame.EndTime(), targetBeat, 1f); landBeat = targetBeat + (float)cond.BeatsToSecs(Minigame.EndTime()-1, cond.GetBpmAtBeat(targetBeat));
if (autoTriggered) if (autoTriggered)
{ {
@ -219,10 +233,9 @@ namespace HeavenStudio.Games.Scripts_CropStomp
if (!isMole) if (!isMole)
{ {
BeatAction.New(gameObject, new List<BeatAction.Action>() MultiSound.Play(
{ new MultiSound.Sound[] { new MultiSound.Sound("cropStomp/veggieOh", targetBeat - 0.5f) }
new BeatAction.Action(targetBeat - 0.5f, delegate { Jukebox.PlayOneShotGame("cropStomp/veggieOh"); }) );
});
} }
else else
{ {
@ -233,8 +246,6 @@ namespace HeavenStudio.Games.Scripts_CropStomp
veggieTrans.localScale = new Vector3(veggieScale.x * 0.5f, veggieScale.y, veggieScale.z); veggieTrans.localScale = new Vector3(veggieScale.x * 0.5f, veggieScale.y, veggieScale.z);
squashTween = veggieTrans.DOScaleX(veggieScale.x, cond.pitchedSecPerBeat * 0.5f); squashTween = veggieTrans.DOScaleX(veggieScale.x, cond.pitchedSecPerBeat * 0.5f);
ResetState();
Update(); // Update flying veggie state immediately. Update(); // Update flying veggie state immediately.
} }
@ -283,13 +294,5 @@ namespace HeavenStudio.Games.Scripts_CropStomp
PickedUpdate(); PickedUpdate();
} }
public override void OnAce()
{
if (veggieState == 0)
StompVeggie(true);
else
PickVeggie(true);
}
} }
} }

View file

@ -10,6 +10,7 @@ namespace HeavenStudio.Games.Scripts_DrummingPractice
{ {
public class Drummer : MonoBehaviour public class Drummer : MonoBehaviour
{ {
DrummingPractice game;
[Header("References")] [Header("References")]
public Animator animator; public Animator animator;
@ -32,9 +33,14 @@ namespace HeavenStudio.Games.Scripts_DrummingPractice
public List<Sprite> Sprites; public List<Sprite> Sprites;
} }
void Awake()
{
game = DrummingPractice.instance;
}
private void Update() private void Update()
{ {
if (player && PlayerInput.Pressed()) if (player && PlayerInput.Pressed() && !DrummingPractice.instance.IsExpectingInputNow(InputType.STANDARD_DOWN))
{ {
Hit(false, false); Hit(false, false);
} }
@ -107,6 +113,5 @@ namespace HeavenStudio.Games.Scripts_DrummingPractice
{ {
hitting = false; hitting = false;
} }
} }
} }

View file

@ -8,66 +8,70 @@ namespace HeavenStudio.Games.Scripts_DrummingPractice
{ {
public class DrummerHit : PlayerActionObject public class DrummerHit : PlayerActionObject
{ {
DrummingPractice game;
public float startBeat; public float startBeat;
public bool applause = true; public bool applause = true;
private bool hit = false;
private bool hasHit = false;
// Start is called before the first frame update // Start is called before the first frame update
void Awake() void Awake()
{ {
PlayerActionInit(gameObject, startBeat); game = DrummingPractice.instance;
} }
public override void OnAce() void Start()
{ {
Hit(true); game.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN, Just, Miss, Out);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat+1f, delegate {
Jukebox.PlayOneShotGame("drummingPractice/drum");
game.leftDrummer.Hit(true, false);
game.rightDrummer.Hit(true, false);
}),
});
} }
// Update is called once per frame // Update is called once per frame
void Update() void Update() { }
private void Just(PlayerActionEvent caller, float state)
{ {
if (Conductor.instance.GetPositionFromBeat(startBeat, 2) >= 1) if (state >= 1f || state <= -1f) {
Hit(false);
}
Hit(true);
}
private void Miss(PlayerActionEvent caller)
{ {
DrummingPractice.instance.SetFaces(0); game.SetFaces(2);
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat+2f, delegate {
game.SetFaces(0);
})
});
CleanUp(); CleanUp();
} }
if (!hit && Conductor.instance.GetPositionFromBeat(startBeat, 1) >= 1) private void Out(PlayerActionEvent caller) {}
{
Jukebox.PlayOneShotGame("drummingPractice/drum");
DrummingPractice.instance.leftDrummer.Hit(true, false);
DrummingPractice.instance.rightDrummer.Hit(true, false);
hit = true;
if (hasHit) CleanUp();
}
float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, 1f);
StateCheck(normalizedBeat);
if (PlayerInput.Pressed())
{
if (state.perfect)
{
Hit(true);
} else if (state.notPerfect())
{
Hit(false);
}
}
}
public void Hit(bool _hit) public void Hit(bool _hit)
{ {
if (!hasHit) game.player.Hit(_hit, applause, true);
game.SetFaces(_hit ? 1 : 2);
if (!_hit)
{ {
DrummingPractice.instance.player.Hit(_hit, applause, true); BeatAction.New(game.gameObject, new List<BeatAction.Action>()
DrummingPractice.instance.SetFaces(_hit ? 1 : 2); {
new BeatAction.Action(startBeat+2f, delegate {
hasHit = true; game.SetFaces(0);
}),
if (hit) CleanUp(); });
} }
CleanUp();
} }
public void CleanUp() public void CleanUp()

View file

@ -34,8 +34,6 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
private bool isEating = false; private bool isEating = false;
public int hitOnFrame;
// Burger shit // Burger shit
public bool topbun, middleburger, bottombun; public bool topbun, middleburger, bottombun;
@ -50,14 +48,11 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
private void LateUpdate() private void LateUpdate()
{ {
if (PlayerInput.Pressed()) if (PlayerInput.Pressed() && !ForkLifter.instance.IsExpectingInputNow(InputType.STANDARD_DOWN))
{ {
hitOnFrame = 0;
Stab(null); Stab(null);
} }
// print(hitOnFrame);
if (ForkLifter.instance.EligibleHits.Count == 0) if (ForkLifter.instance.EligibleHits.Count == 0)
{ {
currentHitInList = 0; currentHitInList = 0;
@ -119,7 +114,7 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
public void Stab(Pea p) public void Stab(Pea p)
{ {
if (isEating || hitOnFrame > 0) return; if (isEating) return;
if (p == null) if (p == null)
{ {

View file

@ -10,6 +10,7 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
{ {
public class Pea : PlayerActionObject public class Pea : PlayerActionObject
{ {
ForkLifter game;
private Animator anim; private Animator anim;
public float startBeat; public float startBeat;
@ -18,6 +19,7 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
private void Awake() private void Awake()
{ {
game = ForkLifter.instance;
anim = GetComponent<Animator>(); anim = GetComponent<Animator>();
// SCHEDULING zoom sound so it lines up with when it meets the fork. // SCHEDULING zoom sound so it lines up with when it meets the fork.
@ -26,21 +28,14 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
var zoomStartTime = currentDspTime + (double)(cond.pitchedSecPerBeat * 2) - 0.317; var zoomStartTime = currentDspTime + (double)(cond.pitchedSecPerBeat * 2) - 0.317;
Jukebox.PlayOneShotScheduledGame("forkLifter/zoomFast", (double)zoomStartTime); Jukebox.PlayOneShotScheduledGame("forkLifter/zoomFast", (double)zoomStartTime);
GetComponentInChildren<SpriteRenderer>().sprite = ForkLifter.instance.peaSprites[type]; GetComponentInChildren<SpriteRenderer>().sprite = game.peaSprites[type];
for (int i = 0; i < transform.GetChild(0).childCount; i++) for (int i = 0; i < transform.GetChild(0).childCount; i++)
{ {
transform.GetChild(0).GetChild(i).GetComponent<SpriteRenderer>().sprite = transform.GetChild(0).GetComponent<SpriteRenderer>().sprite; transform.GetChild(0).GetChild(i).GetComponent<SpriteRenderer>().sprite = transform.GetChild(0).GetComponent<SpriteRenderer>().sprite;
} }
// PlayerActionInit(this.gameObject, startBeat, ForkLifter.instance.EligibleHits); game.ScheduleInput(startBeat, 2f, InputType.STANDARD_DOWN, Just, Miss, Out);
isEligible = true;
}
public override void OnAce()
{
this.Hit();
} }
public void Hit() public void Hit()
@ -63,7 +58,7 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
} }
SpriteRenderer psprite = pea.AddComponent<SpriteRenderer>(); SpriteRenderer psprite = pea.AddComponent<SpriteRenderer>();
psprite.sprite = ForkLifter.instance.peaHitSprites[type]; psprite.sprite = game.peaHitSprites[type];
psprite.sortingOrder = 20; psprite.sortingOrder = 20;
switch (type) switch (type)
{ {
@ -128,7 +123,7 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
} }
SpriteRenderer psprite = pea.AddComponent<SpriteRenderer>(); SpriteRenderer psprite = pea.AddComponent<SpriteRenderer>();
psprite.sprite = ForkLifter.instance.peaHitSprites[type]; psprite.sprite = game.peaHitSprites[type];
psprite.sortingOrder = 20; psprite.sortingOrder = 20;
ForkLifterPlayer.instance.HitFXMiss(new Vector2(1.0424f, -4.032f), new Vector2(1.129612f, 1.129612f)); ForkLifterPlayer.instance.HitFXMiss(new Vector2(1.0424f, -4.032f), new Vector2(1.129612f, 1.129612f));
ForkLifterPlayer.instance.HitFXMiss(new Vector2(0.771f, -3.016f), new Vector2(1.71701f, 1.71701f)); ForkLifterPlayer.instance.HitFXMiss(new Vector2(0.771f, -3.016f), new Vector2(1.71701f, 1.71701f));
@ -159,7 +154,7 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
} }
SpriteRenderer psprite = pea.AddComponent<SpriteRenderer>(); SpriteRenderer psprite = pea.AddComponent<SpriteRenderer>();
psprite.sprite = ForkLifter.instance.peaHitSprites[type]; psprite.sprite = game.peaHitSprites[type];
psprite.sortingOrder = 20; psprite.sortingOrder = 20;
ForkLifterPlayer.instance.HitFXMiss(new Vector2(1.0424f, -4.032f), new Vector2(1.129612f, 1.129612f)); ForkLifterPlayer.instance.HitFXMiss(new Vector2(1.0424f, -4.032f), new Vector2(1.129612f, 1.129612f));
ForkLifterPlayer.instance.HitFXMiss(new Vector2(0.771f, -3.016f), new Vector2(1.71701f, 1.71701f)); ForkLifterPlayer.instance.HitFXMiss(new Vector2(0.771f, -3.016f), new Vector2(1.71701f, 1.71701f));
@ -179,34 +174,35 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(startBeat, 2.45f); float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(startBeat, 2.45f);
anim.Play("Flicked_Object", -1, normalizedBeatAnim); anim.Play("Flicked_Object", -1, normalizedBeatAnim);
anim.speed = 0; anim.speed = 0;
float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, 2f);
StateCheck(normalizedBeat);
if (PlayerInput.Pressed() && ForkLifterPlayer.instance.hitOnFrame == 0)
{
if (state.perfect)
{
Hit();
} }
else if (state.early)
private void Just(PlayerActionEvent caller, float state)
{ {
Early(); if (state >= 1f)
}
else if (state.late)
{ {
Late(); Late();
} }
else if (state <= -1f)
ForkLifterPlayer.instance.hitOnFrame++; {
Early();
}
else
{
Hit();
}
} }
if (normalizedBeat > Minigame.EndTime()) private void Miss(PlayerActionEvent caller)
{ {
Jukebox.PlayOneShot("audience/disappointed"); Jukebox.PlayOneShot("audience/disappointed");
BeatAction.New(game.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(startBeat+ 2.45f, delegate {
Destroy(this.gameObject); Destroy(this.gameObject);
}),
});
} }
}
private void Out(PlayerActionEvent caller) {}
} }
} }

View file

@ -113,6 +113,9 @@ namespace HeavenStudio.Games
foreach(PlayerActionEvent toCompare in scheduledInputs) foreach(PlayerActionEvent toCompare in scheduledInputs)
{ {
// ignore inputs that are for sequencing in autoplay
if (toCompare.autoplayOnly) continue;
if(closest == null) if(closest == null)
{ {
if (input == InputType.ANY || toCompare.inputType.HasFlag(input)) if (input == InputType.ANY || toCompare.inputType.HasFlag(input))

View file

@ -13,25 +13,27 @@ namespace HeavenStudio.Util
public class Action public class Action
{ {
public float beat { get; set; } public double beat { get; set; }
public EventCallback function { get; set; } public EventCallback function { get; set; }
public Action(float beat, EventCallback function) public Action(double beat, EventCallback function)
{ {
this.beat = beat; this.beat = beat;
this.function = function; this.function = function;
} }
} }
public static void New(GameObject prefab, List<Action> actions) public static BeatAction New(GameObject prefab, List<Action> actions)
{ {
BeatAction beatAction = prefab.AddComponent<BeatAction>(); BeatAction beatAction = prefab.AddComponent<BeatAction>();
beatAction.actions = actions; beatAction.actions = actions;
return beatAction;
} }
private void Update() private void Update()
{ {
float songPositionInBeats = Conductor.instance.songPositionInBeats; double songPositionInBeats = Conductor.instance.songPositionInBeatsAsDouble;
for (int i = 0; i < actions.Count; i++) for (int i = 0; i < actions.Count; i++)
{ {
@ -42,6 +44,11 @@ namespace HeavenStudio.Util
} }
} }
} }
public void Delete()
{
Destroy(this);
}
} }
} }