particle + arc adjustment, fix weird anim play on gameswitch

This commit is contained in:
AstrlJelly 2023-12-30 15:31:33 -05:00
parent 5514609cc9
commit 70badc64c1
3 changed files with 11 additions and 15 deletions

View file

@ -263,7 +263,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 344575782839395223}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -25, y: 4, z: 0}
m_LocalPosition: {x: -25, y: 2.81, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -2061,7 +2061,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5367660552507315250}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.63, y: -0.77, z: 0}
m_LocalPosition: {x: 2.67, y: -0.77, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -2151,7 +2151,7 @@ ParticleSystem:
startLifetime:
serializedVersion: 2
minMaxState: 0
scalar: 5
scalar: 0.6
minScalar: 5
maxCurve:
serializedVersion: 2
@ -3012,7 +3012,7 @@ ParticleSystem:
countCurve:
serializedVersion: 2
minMaxState: 0
scalar: 10
scalar: 5
minScalar: 30
maxCurve:
serializedVersion: 2
@ -3085,13 +3085,13 @@ ParticleSystem:
inWeight: 0
outWeight: 0.67731327
- serializedVersion: 3
time: 0.19609144
time: 1
value: 0
inSlope: -12.338608
outSlope: -12.338608
inSlope: -3.0356529
outSlope: -3.0356529
tangentMode: 0
weightedMode: 0
inWeight: 0.18219988
inWeight: 0.1632253
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2

View file

@ -2,7 +2,6 @@ using HeavenStudio.Util;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace HeavenStudio.Games.Scripts_MeatGrinder
@ -105,7 +104,6 @@ namespace HeavenStudio.Games.Scripts_MeatGrinder
SoundByte.PlayOneShotGame("meatGrinder/" + (isBarely ? "tink" : "meatHit"));
game.TackAnim.DoScaledAnimationAsync("TackHit" + (isBarely ? "Barely" : "Success"), 0.5f);
(float rangeStart, float rangeEnd) = meatType switch { // im not good enough at math to figure out how to make this an equation
MeatType.DarkMeat => (0, 0.333f),
MeatType.LightMeat => (0.334f, 0.666f),
@ -113,7 +111,8 @@ namespace HeavenStudio.Games.Scripts_MeatGrinder
};
var sheetAnim = game.MeatSplash.textureSheetAnimation;
sheetAnim.frameOverTime = new ParticleSystem.MinMaxCurve(rangeStart, rangeEnd);
// 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;
game.MeatSplash.Emit(new ParticleSystem.EmitParams(), amount);

View file

@ -276,9 +276,6 @@ namespace HeavenStudio.Games
CartGuyParentAnim.gameObject.SetActive(cartEase.length != 0);
// Debug.Log("isPlaying : " + cond.isPlaying);
// Debug.Log("isPaused : " + cond.isPaused);
// Debug.Log("NotStopped : " + cond.NotStopped());
if (cond.isPlaying && !cond.isPaused) {
foreach (Transform gear in Gears) {
double newZ = Time.deltaTime * currentGearSpeed * 50 * (gear.name == "Big" ? -1 : 1) / cond.pitchedSecPerBeat;
@ -420,7 +417,7 @@ namespace HeavenStudio.Games
public void StartInterval(double beat, float length, double gameSwitchBeat, bool autoPassTurn)
{
List<BeatAction.Action> actions = new() {
new(beat - 1, delegate { BossAnim.DoScaledAnimationFromBeatAsync("BossSignal", 0.5f, beat - 1); }),
new(beat - 1, delegate { if (Conductor.instance.songPositionInBeatsAsDouble < beat) BossAnim.DoScaledAnimationFromBeatAsync("BossSignal", 0.5f, beat - 1); }),
};
var allCallEvents = GetRelevantMeatCallsBetweenBeat(beat, beat + length);