make particles beat based
just waiting on mine to fix the offset bug
This commit is contained in:
parent
9bb5836de8
commit
28726add37
|
|
@ -16,7 +16,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!4 &7113627674537123824
|
--- !u!4 &7113627674537123824
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -263,7 +263,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 344575782839395223}
|
m_GameObject: {fileID: 344575782839395223}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -25, y: 2.81, z: 0}
|
m_LocalPosition: {x: -23.14, y: 1.5, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
@ -2077,7 +2077,7 @@ ParticleSystem:
|
||||||
m_GameObject: {fileID: 5367660552507315250}
|
m_GameObject: {fileID: 5367660552507315250}
|
||||||
serializedVersion: 8
|
serializedVersion: 8
|
||||||
lengthInSec: 0.1
|
lengthInSec: 0.1
|
||||||
simulationSpeed: 1.3
|
simulationSpeed: 1
|
||||||
stopAction: 0
|
stopAction: 0
|
||||||
cullingMode: 0
|
cullingMode: 0
|
||||||
ringBufferMode: 0
|
ringBufferMode: 0
|
||||||
|
|
@ -2151,7 +2151,7 @@ ParticleSystem:
|
||||||
startLifetime:
|
startLifetime:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 0
|
minMaxState: 0
|
||||||
scalar: 0.6
|
scalar: 0.45
|
||||||
minScalar: 5
|
minScalar: 5
|
||||||
maxCurve:
|
maxCurve:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
|
@ -2643,7 +2643,7 @@ ParticleSystem:
|
||||||
gravityModifier:
|
gravityModifier:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 0
|
minMaxState: 0
|
||||||
scalar: 3.5
|
scalar: 4
|
||||||
minScalar: 0
|
minScalar: 0
|
||||||
maxCurve:
|
maxCurve:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
|
@ -3228,10 +3228,10 @@ ParticleSystem:
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
separateAxes: 0
|
separateAxes: 0
|
||||||
RotationModule:
|
RotationModule:
|
||||||
enabled: 0
|
enabled: 1
|
||||||
x:
|
x:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 0
|
minMaxState: 3
|
||||||
scalar: 0
|
scalar: 0
|
||||||
minScalar: 0
|
minScalar: 0
|
||||||
maxCurve:
|
maxCurve:
|
||||||
|
|
@ -3284,7 +3284,7 @@ ParticleSystem:
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
y:
|
y:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 0
|
minMaxState: 3
|
||||||
scalar: 0
|
scalar: 0
|
||||||
minScalar: 0
|
minScalar: 0
|
||||||
maxCurve:
|
maxCurve:
|
||||||
|
|
@ -3337,9 +3337,9 @@ ParticleSystem:
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
curve:
|
curve:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
minMaxState: 0
|
minMaxState: 3
|
||||||
scalar: 0.7853982
|
scalar: 1.2217305
|
||||||
minScalar: 0.7853982
|
minScalar: -1.2217305
|
||||||
maxCurve:
|
maxCurve:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Curve:
|
m_Curve:
|
||||||
|
|
@ -8004,7 +8004,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 8541881261740536524}
|
m_GameObject: {fileID: 8541881261740536524}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -16, y: -4, z: 0}
|
m_LocalPosition: {x: -20.58, y: -4.49, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|
|
||||||
|
|
@ -110,11 +110,13 @@ namespace HeavenStudio.Games.Scripts_MeatGrinder
|
||||||
MeatType.BaconBall or _ => (0.667f, 1),
|
MeatType.BaconBall or _ => (0.667f, 1),
|
||||||
};
|
};
|
||||||
var sheetAnim = game.MeatSplash.textureSheetAnimation;
|
var sheetAnim = game.MeatSplash.textureSheetAnimation;
|
||||||
|
var main = game.MeatSplash.main;
|
||||||
sheetAnim.frameOverTime = new ParticleSystem.MinMaxCurve(rangeStart, rangeEnd);
|
sheetAnim.frameOverTime = new ParticleSystem.MinMaxCurve(rangeStart, rangeEnd);
|
||||||
|
main.simulationSpeed = 0.5f / Conductor.instance.pitchedSecPerBeat;
|
||||||
|
|
||||||
// has a probability of zero normally so it's not played with Play() but this exposes it to the editor
|
// has a probability of zero normally so it's not played with Play() but this exposes it to the editor
|
||||||
int amount = (int)game.MeatSplash.emission.GetBurst(0).count.constant;
|
var emission = game.MeatSplash.emission;
|
||||||
game.MeatSplash.Emit(new ParticleSystem.EmitParams(), amount);
|
game.MeatSplash.Emit(new ParticleSystem.EmitParams(), (int)emission.GetBurst(0).count.constant);
|
||||||
|
|
||||||
if (tackReaction.expression > 0) {
|
if (tackReaction.expression > 0) {
|
||||||
BeatAction.New(game, new List<BeatAction.Action>() {
|
BeatAction.New(game, new List<BeatAction.Action>() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue