Added bg colour change

This commit is contained in:
Rapandrasmus 2023-01-22 23:38:30 +01:00
parent 26c535a337
commit 9f83768e95
4 changed files with 642 additions and 2 deletions

View file

@ -165,7 +165,7 @@ Transform:
m_GameObject: {fileID: 5129989806025303121}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.55, y: 0.15, z: 0}
m_LocalScale: {x: 1.9, y: 1.9, z: 1.9}
m_LocalScale: {x: 1.9, y: 1.8717822, z: 1.9}
m_Children: []
m_Father: {fileID: 5822623106182197534}
m_RootOrder: 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View file

@ -0,0 +1,612 @@
fileFormatVersion: 2
guid: acd693c1fde19d042929bf294ef22652
TextureImporter:
internalIDToNameTable:
- first:
213: 1894471701178610799
second: lockstepRepeatable_0
- first:
213: -5648438279816179167
second: lockstepRepeatable_1
- first:
213: 1121469191080009011
second: lockstepRepeatable_2
- first:
213: -137192944987550641
second: lockstepRepeatable_3
- first:
213: -6919983580436838845
second: lockstepRepeatable_4
- first:
213: 6981406882115810120
second: lockstepRepeatable_5
- first:
213: -4268047275512581111
second: lockstepRepeatable_6
- first:
213: -5426827229022038452
second: lockstepRepeatable_7
- first:
213: -5582238065666526419
second: lockstepRepeatable_8
- first:
213: 8162581962008686090
second: lockstepRepeatable_9
- first:
213: 4581228604998481109
second: lockstepRepeatable_10
- first:
213: -8886235708239590621
second: lockstepRepeatable_11
- first:
213: 7801595694588898106
second: lockstepRepeatable_12
- first:
213: 215196500088483457
second: lockstepRepeatable_13
- first:
213: -454216104834229050
second: lockstepRepeatable_14
- first:
213: 4998959497507365497
second: lockstepRepeatable_15
- first:
213: -5919225436619208990
second: lockstepRepeatable_16
- first:
213: 145107725331859318
second: lockstepRepeatable_17
- first:
213: 7472783916045075437
second: lockstepRepeatable_18
- first:
213: 2869568550977246906
second: lockstepRepeatable_19
- first:
213: -3443858510538921246
second: lockstepRepeatable_20
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: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: lockstepRepeatable_0
rect:
serializedVersion: 2
x: 28
y: 299
width: 96
height: 199
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: f64f7c199f38a4a10800000000000000
internalID: 1894471701178610799
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_1
rect:
serializedVersion: 2
x: 170
y: 301
width: 85
height: 201
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 12296dbaf47bc91b0800000000000000
internalID: -5648438279816179167
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_2
rect:
serializedVersion: 2
x: 304
y: 300
width: 103
height: 202
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 33d5ed89942409f00800000000000000
internalID: 1121469191080009011
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_3
rect:
serializedVersion: 2
x: 471
y: 301
width: 84
height: 201
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: f4cc3505eb7981ef0800000000000000
internalID: -137192944987550641
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_4
rect:
serializedVersion: 2
x: 590
y: 300
width: 103
height: 202
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 346c684e89747ff90800000000000000
internalID: -6919983580436838845
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_5
rect:
serializedVersion: 2
x: 728
y: 313
width: 161
height: 193
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 843faf8f190f2e060800000000000000
internalID: 6981406882115810120
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_6
rect:
serializedVersion: 2
x: 918
y: 313
width: 161
height: 193
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 904bf72bd99d4c4c0800000000000000
internalID: -4268047275512581111
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_7
rect:
serializedVersion: 2
x: 1116
y: 313
width: 161
height: 193
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: c4659b4436900b4b0800000000000000
internalID: -5426827229022038452
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_8
rect:
serializedVersion: 2
x: 1311
y: 313
width: 160
height: 193
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: d2378442e08e782b0800000000000000
internalID: -5582238065666526419
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_9
rect:
serializedVersion: 2
x: 26
y: 41
width: 97
height: 200
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: a0ee9871c01574170800000000000000
internalID: 8162581962008686090
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_10
rect:
serializedVersion: 2
x: 163
y: 42
width: 97
height: 215
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 5d4fac3d42bc39f30800000000000000
internalID: 4581228604998481109
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_11
rect:
serializedVersion: 2
x: 281
y: 41
width: 97
height: 227
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 32bccf364bfbda480800000000000000
internalID: -8886235708239590621
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_12
rect:
serializedVersion: 2
x: 399
y: 41
width: 97
height: 233
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: a3b203913f5d44c60800000000000000
internalID: 7801595694588898106
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_13
rect:
serializedVersion: 2
x: 624
y: 203
width: 74
height: 73
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 18e6ea0a3188cf200800000000000000
internalID: 215196500088483457
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_14
rect:
serializedVersion: 2
x: 650
y: 78
width: 134
height: 195
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 6cc1814fbdc42b9f0800000000000000
internalID: -454216104834229050
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_15
rect:
serializedVersion: 2
x: 840
y: 78
width: 135
height: 188
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 972ed776d2fdf5540800000000000000
internalID: 4998959497507365497
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_16
rect:
serializedVersion: 2
x: 1018
y: 78
width: 133
height: 195
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 2e60bd8a3dfaadda0800000000000000
internalID: -5919225436619208990
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_17
rect:
serializedVersion: 2
x: 1104
y: 203
width: 73
height: 73
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 677029615b6830200800000000000000
internalID: 145107725331859318
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_18
rect:
serializedVersion: 2
x: 1214
y: 78
width: 135
height: 188
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: de38e1f0169a4b760800000000000000
internalID: 7472783916045075437
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_19
rect:
serializedVersion: 2
x: 1412
y: 127
width: 108
height: 107
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: ab691abb461c2d720800000000000000
internalID: 2869568550977246906
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: lockstepRepeatable_20
rect:
serializedVersion: 2
x: 1553
y: 127
width: 107
height: 107
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 2ea2f965ee4f430d0800000000000000
internalID: -3443858510538921246
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -21,7 +21,7 @@ namespace HeavenStudio.Games.Loaders
function = delegate { var e = eventCaller.currentEntity; Lockstep.instance.Bop(e.beat, e["toggle"]); },
parameters = new List<Param>()
{
new Param("toggle", false, "Reset Pose", "Resets to idle pose.")
new Param("toggle", false, "Reset Pose", "Resets to idle pose.")
},
defaultLength = 1f,
},
@ -46,6 +46,16 @@ namespace HeavenStudio.Games.Loaders
preFunction = delegate {var e = eventCaller.currentEntity; Lockstep.Marching(e.beat, e.length);},
defaultLength = 4f,
resizable = true
},
new GameAction("set colours", "Set Background Colours")
{
function = delegate {var e = eventCaller.currentEntity; Lockstep.instance.SetbackgroundColours(e["colorA"], e["colorB"]); },
parameters = new List<Param>()
{
new Param("colorA", Lockstep.defaultBGColorOn, "Onbeat", "Select the color that appears for the onbeat."),
new Param("colorB", Lockstep.defaultBGColorOff, "Offbeat", "Select the color that appears for the offbeat."),
},
defaultLength = 0.5f,
}
});
@ -97,6 +107,7 @@ namespace HeavenStudio.Games
MissedOff = 1,
MissedOn = 2
}
bool offColorActive;
public static Lockstep instance;
@ -303,6 +314,23 @@ namespace HeavenStudio.Games
public void ChangeBeatBackGroundColour(bool off)
{
if (off)
{
background.color = currentBGOffColor;
offColorActive = true;
}
else
{
background.color = currentBGOnColor;
offColorActive = false;
}
}
public void SetbackgroundColours(Color onColor, Color offColor)
{
currentBGOnColor = onColor;
currentBGOffColor = offColor;
if (offColorActive)
{
background.color = currentBGOffColor;
}