Change Block

This commit is contained in:
fu-majime 2024-03-24 14:41:56 +09:00
parent c0e5980324
commit 76b293398e
6 changed files with 212 additions and 59 deletions

View file

@ -171,6 +171,11 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
SoundSequences: [] SoundSequences: []
scheduledInputs: [] scheduledInputs: []
blocks:
- {fileID: 5696860149884327676}
- {fileID: 224928381323362584}
- {fileID: 6254207078265654522}
- {fileID: 5821551822996478014}
blockAnims: blockAnims:
- {fileID: 1844026232355082904} - {fileID: 1844026232355082904}
- {fileID: 6162902461251519868} - {fileID: 6162902461251519868}
@ -181,7 +186,6 @@ MonoBehaviour:
baseRightSquare: {fileID: 6631181169301220531} baseRightSquare: {fileID: 6631181169301220531}
baseAssembled: {fileID: 3641708035931060140} baseAssembled: {fileID: 3641708035931060140}
widgetHolder: {fileID: 4637116116151750227} widgetHolder: {fileID: 4637116116151750227}
spawnedRods: []
curve: curve:
- {fileID: 5374345566761818774} - {fileID: 5374345566761818774}
- {fileID: 1936227407808079596} - {fileID: 1936227407808079596}
@ -210,8 +214,6 @@ MonoBehaviour:
- {fileID: 663361784237137429} - {fileID: 663361784237137429}
- {fileID: 2107336164975858084} - {fileID: 2107336164975858084}
- {fileID: 5864016952948325823} - {fileID: 5864016952948325823}
isPlayerOpen: 0
isPlayerPrepare: 0
--- !u!1 &2979763165916823418 --- !u!1 &2979763165916823418
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1227,7 +1229,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!4 &6137499710566233010 --- !u!4 &6137499710566233010
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1689,7 +1691,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 &7566142852410955114 --- !u!4 &7566142852410955114
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2532,6 +2534,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: whiteblock (2) value: whiteblock (2)
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1370668342187640311, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
propertyPath: position
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} - target: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 1 value: 1
@ -2578,6 +2584,17 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
--- !u!114 &224928381323362584 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1370668342187640311, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
m_PrefabInstance: {fileID: 1160394556917220591}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af1ad68da0d45f4459bc6f243a8749c0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &2477724359068826475 stripped --- !u!4 &2477724359068826475 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} m_CorrespondingSourceObject: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
@ -2984,6 +3001,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: whiteblock (4) value: whiteblock (4)
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1370668342187640311, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
propertyPath: position
value: 3
objectReference: {fileID: 0}
- target: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} - target: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 2 value: 2
@ -3035,6 +3056,17 @@ Animator:
m_CorrespondingSourceObject: {fileID: 5016319015922827667, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} m_CorrespondingSourceObject: {fileID: 5016319015922827667, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
m_PrefabInstance: {fileID: 4886362793593036233} m_PrefabInstance: {fileID: 4886362793593036233}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &5821551822996478014 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1370668342187640311, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
m_PrefabInstance: {fileID: 4886362793593036233}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af1ad68da0d45f4459bc6f243a8749c0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &8194282533764227661 stripped --- !u!4 &8194282533764227661 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} m_CorrespondingSourceObject: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
@ -3059,6 +3091,10 @@ PrefabInstance:
propertyPath: m_Sprite propertyPath: m_Sprite
value: value:
objectReference: {fileID: 1261120505, guid: 8c8670c5276d2c746be1ae29cba493ef, type: 3} objectReference: {fileID: 1261120505, guid: 8c8670c5276d2c746be1ae29cba493ef, type: 3}
- target: {fileID: 1370668342187640311, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
propertyPath: position
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2393234158427641566, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} - target: {fileID: 2393234158427641566, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
propertyPath: m_Sprite propertyPath: m_Sprite
value: value:
@ -3154,6 +3190,17 @@ Animator:
m_CorrespondingSourceObject: {fileID: 5016319015922827667, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} m_CorrespondingSourceObject: {fileID: 5016319015922827667, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
m_PrefabInstance: {fileID: 5030238947133212941} m_PrefabInstance: {fileID: 5030238947133212941}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &6254207078265654522 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1370668342187640311, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
m_PrefabInstance: {fileID: 5030238947133212941}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af1ad68da0d45f4459bc6f243a8749c0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &8626317659644753545 stripped --- !u!4 &8626317659644753545 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} m_CorrespondingSourceObject: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
@ -3590,6 +3637,17 @@ Animator:
m_CorrespondingSourceObject: {fileID: 5016319015922827667, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} m_CorrespondingSourceObject: {fileID: 5016319015922827667, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
m_PrefabInstance: {fileID: 6632332787516494603} m_PrefabInstance: {fileID: 6632332787516494603}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &5696860149884327676 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1370668342187640311, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}
m_PrefabInstance: {fileID: 6632332787516494603}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af1ad68da0d45f4459bc6f243a8749c0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &7958685283159960719 stripped --- !u!4 &7958685283159960719 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3} m_CorrespondingSourceObject: {fileID: 3636702461004627844, guid: 7f6c0a32ae05cc9499e4e8fe2c729bbb, type: 3}

View file

@ -262,6 +262,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 3636702461004627844} - component: {fileID: 3636702461004627844}
- component: {fileID: 5016319015922827667} - component: {fileID: 5016319015922827667}
- component: {fileID: 1370668342187640311}
m_Layer: 0 m_Layer: 0
m_Name: whiteblock m_Name: whiteblock
m_TagString: Untagged m_TagString: Untagged
@ -308,6 +309,21 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1 m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0 m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0 m_WriteDefaultValuesOnDisable: 0
--- !u!114 &1370668342187640311
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 876647762485842733}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af1ad68da0d45f4459bc6f243a8749c0, type: 3}
m_Name:
m_EditorClassIdentifier:
position: 0
isOpen: 0
isPrepare: 0
--- !u!1 &1305944185207812440 --- !u!1 &1305944185207812440
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View file

@ -0,0 +1,99 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using NaughtyBezierCurves;
namespace HeavenStudio.Games.Scripts_BuiltToScaleRvl
{
using HeavenStudio.Util;
public class Block : MonoBehaviour
{
public int position;
private Animator blockAnim;
public bool isOpen = false;
public bool isPrepare = false;
private double closeBeat;
private BuiltToScaleRvl game;
private void Awake()
{
game = BuiltToScaleRvl.instance;
blockAnim = GetComponent<Animator>();
if (!BuiltToScaleRvl.IsPositionInRange(position)) position = 0;
}
public void Bounce(double beat)
{
SoundByte.PlayOneShotGame(position switch {
0 => "builtToScaleRvl/left",
1 => "builtToScaleRvl/middleLeft",
2 => "builtToScaleRvl/middleRight",
3 => "builtToScaleRvl/right",
_ => throw new System.NotImplementedException()
});
blockAnim.Play("bounce", 0, 0);
if (closeBeat < beat) closeBeat = beat;
}
public void BounceNearlyMiss()
{
blockAnim.Play("open", 0, 0);
}
public void BounceMiss()
{
blockAnim.Play("miss", 0, 0);
}
public void Prepare()
{
SoundByte.PlayOneShotGame("builtToScaleRvl/playerRetract");
if (PlayerInput.CurrentControlStyle is InputSystem.InputController.ControlStyles.Pad) {
blockAnim.Play("prepare B", 0, 0);
} else {
blockAnim.Play("prepare AB", 0, 0);
}
isOpen = false;
isPrepare = true;
}
public void Shoot()
{
SoundByte.PlayOneShotGame("builtToScaleRvl/shoot");
blockAnim.Play("shoot", 0, 0);
isPrepare = false;
}
public void ShootNearlyMiss()
{
if (PlayerInput.CurrentControlStyle is InputSystem.InputController.ControlStyles.Pad) {
blockAnim.Play("shoot miss B", 0, 0);
} else {
blockAnim.Play("shoot miss AB", 0, 0);
}
isPrepare = false;
}
public void ShootMiss()
{
if (PlayerInput.CurrentControlStyle is InputSystem.InputController.ControlStyles.Pad) {
blockAnim.Play("shoot miss B", 0, 0);
} else {
blockAnim.Play("shoot miss AB", 0, 0);
}
isPrepare = false;
}
public void Open()
{
blockAnim.Play("open", 0, 0);
isOpen = true;
}
public void Idle(double beat = double.MinValue)
{
Debug.Log($"Idle:{closeBeat}, {beat}");
if (closeBeat > beat) return;
blockAnim.Play("idle", 0, 0);
isOpen = false;
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: af1ad68da0d45f4459bc6f243a8749c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -75,7 +75,7 @@ namespace HeavenStudio.Games
using Scripts_BuiltToScaleRvl; using Scripts_BuiltToScaleRvl;
public class BuiltToScaleRvl : Minigame public class BuiltToScaleRvl : Minigame
{ {
[SerializeField] Animator[] blockAnims; [SerializeField] Block[] blocks;
[SerializeField] GameObject baseRod; [SerializeField] GameObject baseRod;
[SerializeField] GameObject baseLeftSquare; [SerializeField] GameObject baseLeftSquare;
[SerializeField] GameObject baseRightSquare; [SerializeField] GameObject baseRightSquare;
@ -126,7 +126,6 @@ namespace HeavenStudio.Games
private double gameStartBeat = double.MinValue, gameEndBeat = double.MaxValue; private double gameStartBeat = double.MinValue, gameEndBeat = double.MaxValue;
List<ScheduledWidget> scheduledWidgets = new List<ScheduledWidget>(); List<ScheduledWidget> scheduledWidgets = new List<ScheduledWidget>();
int widgetIndex; int widgetIndex;
public List<Rod> spawnedRods = new List<Rod>();
public BezierCurve3D[] curve; public BezierCurve3D[] curve;
public static readonly Dictionary<(int, int), int> curveMap = new Dictionary<(int, int), int> { public static readonly Dictionary<(int, int), int> curveMap = new Dictionary<(int, int), int> {
@ -243,8 +242,8 @@ namespace HeavenStudio.Games
OnGameSwitch(beat); OnGameSwitch(beat);
} }
public bool isPlayerOpen = false; public bool isPlayerOpen { get { return blocks[2].isOpen; } }
public bool isPlayerPrepare = false; public bool isPlayerPrepare { get { return blocks[2].isPrepare; } }
void Update() void Update()
{ {
@ -288,9 +287,7 @@ namespace HeavenStudio.Games
public void SpawnRod(double beat, double length, int currentPos, int nextPos, int id, CustomBounceItem[] bounceItems, int endTime, bool isShoot) public void SpawnRod(double beat, double length, int currentPos, int nextPos, int id, CustomBounceItem[] bounceItems, int endTime, bool isShoot)
{ {
// if (spawnedRods.Any(x => x.ID == id)) return;
var newRod = Instantiate(baseRod, widgetHolder).GetComponent<Rod>(); var newRod = Instantiate(baseRod, widgetHolder).GetComponent<Rod>();
spawnedRods.Add(newRod);
newRod.startBeat = beat; newRod.startBeat = beat;
newRod.lengthBeat = length; newRod.lengthBeat = length;
@ -427,79 +424,52 @@ namespace HeavenStudio.Games
return shootTime; return shootTime;
} }
public void PlayBlockBounce(int position) public void PlayBlockBounce(int position, double beat)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
SoundByte.PlayOneShotGame(position switch { blocks[position].Bounce(beat);
0 => "builtToScaleRvl/left",
1 => "builtToScaleRvl/middleLeft",
2 => "builtToScaleRvl/middleRight",
3 => "builtToScaleRvl/right",
_ => throw new System.NotImplementedException()
});
blockAnims[position].Play("bounce", 0, 0);
} }
public void PlayBlockBounceNearlyMiss(int position) public void PlayBlockBounceNearlyMiss(int position)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
blockAnims[position].Play("open", 0, 0); blocks[position].BounceNearlyMiss();
} }
public void PlayBlockBounceMiss(int position) public void PlayBlockBounceMiss(int position)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
blockAnims[position].Play("miss", 0, 0); blocks[position].BounceMiss();
} }
public void PlayBlockPrepare(int position) public void PlayBlockPrepare(int position)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
SoundByte.PlayOneShotGame("builtToScaleRvl/playerRetract"); blocks[position].Prepare();
if (PlayerInput.CurrentControlStyle is InputSystem.InputController.ControlStyles.Pad) {
blockAnims[position].Play("prepare B", 0, 0);
} else {
blockAnims[position].Play("prepare AB", 0, 0);
}
isPlayerOpen = false;
isPlayerPrepare = true;
} }
public void PlayBlockShoot(int position) public void PlayBlockShoot(int position)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
SoundByte.PlayOneShotGame("builtToScaleRvl/shoot"); blocks[position].Shoot();
blockAnims[position].Play("shoot", 0, 0);
isPlayerPrepare = false;
} }
public void PlayBlockShootNearlyMiss(int position) public void PlayBlockShootNearlyMiss(int position)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
if (PlayerInput.CurrentControlStyle is InputSystem.InputController.ControlStyles.Pad) { blocks[position].ShootNearlyMiss();
blockAnims[position].Play("shoot miss B", 0, 0);
} else {
blockAnims[position].Play("shoot miss AB", 0, 0);
}
isPlayerPrepare = false;
} }
public void PlayBlockShootMiss(int position) public void PlayBlockShootMiss(int position)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
if (PlayerInput.CurrentControlStyle is InputSystem.InputController.ControlStyles.Pad) { blocks[position].ShootMiss();
blockAnims[position].Play("shoot miss B", 0, 0);
} else {
blockAnims[position].Play("shoot miss AB", 0, 0);
}
isPlayerPrepare = false;
} }
public void PlayBlockOpen(int position) public void PlayBlockOpen(int position)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
blockAnims[position].Play("open", 0, 0); blocks[position].Open();
isPlayerOpen = true;
} }
public void PlayBlockIdle(int position) public void PlayBlockIdle(int position, double beat = double.MinValue)
{ {
if (!IsPositionInRange(position)) return; if (!IsPositionInRange(position)) return;
blockAnims[position].Play("idle", 0, 0); blocks[position].Idle(beat);
} }
public static int getFollowingPos(int currentPos, int nextPos, int nextTime, CustomBounceItem[] bounceItems) public static int getFollowingPos(int currentPos, int nextPos, int nextTime, CustomBounceItem[] bounceItems)

View file

@ -62,7 +62,7 @@ namespace HeavenStudio.Games.Scripts_BuiltToScaleRvl
if (BuiltToScaleRvl.IsPositionInRange(currentPos) && playBounce) if (BuiltToScaleRvl.IsPositionInRange(currentPos) && playBounce)
{ {
actions.Add(new BeatAction.Action(beat, () => game.PlayBlockBounce(currentPos))); actions.Add(new BeatAction.Action(beat, () => game.PlayBlockBounce(currentPos, beat + length)));
} }
actions.Add(new BeatAction.Action(beat, delegate actions.Add(new BeatAction.Action(beat, delegate
@ -97,7 +97,7 @@ namespace HeavenStudio.Games.Scripts_BuiltToScaleRvl
if (BuiltToScaleRvl.IsPositionInRange(currentPos)) if (BuiltToScaleRvl.IsPositionInRange(currentPos))
{ {
actions.Add(new BeatAction.Action(beat + length, () => game.PlayBlockIdle(currentPos))); actions.Add(new BeatAction.Action(beat + length, () => game.PlayBlockIdle(currentPos, beat + length)));
} }
BeatAction.New(game, actions); BeatAction.New(game, actions);
@ -132,20 +132,20 @@ namespace HeavenStudio.Games.Scripts_BuiltToScaleRvl
return; return;
} }
game.PlayBlockBounce(this.nextPos); game.PlayBlockBounce(this.nextPos, currentBeat + 2*lengthBeat);
BounceRecursion(currentBeat + lengthBeat, lengthBeat, nextPos, followingPos, false); BounceRecursion(currentBeat + lengthBeat, lengthBeat, nextPos, followingPos, false);
} }
private void BounceOnMiss(PlayerActionEvent caller) private void BounceOnMiss(PlayerActionEvent caller)
{ {
game.PlayBlockBounceMiss(this.nextPos);
BeatAction.New(this, new List<BeatAction.Action>() {new BeatAction.Action(currentBeat + 2*lengthBeat, delegate {
game.PlayBlockIdle(this.nextPos, currentBeat + 2*lengthBeat);
RemoveAndDestroy();
})});
currentCurve = game.curve[^1]; // miss currentCurve = game.curve[^1]; // miss
currentBeat = Conductor.instance.songPositionInBeats; currentBeat = Conductor.instance.songPositionInBeats;
rodAnim.SetFloat("speed", -1f); rodAnim.SetFloat("speed", -1f);
isMiss = true; isMiss = true;
game.PlayBlockBounceMiss(this.nextPos);
BeatAction.New(this, new List<BeatAction.Action>() {new BeatAction.Action(currentBeat + lengthBeat, delegate {
game.PlayBlockIdle(this.nextPos);
RemoveAndDestroy();
})});
} }
private bool CanBounceHit() private bool CanBounceHit()
{ {
@ -200,7 +200,6 @@ namespace HeavenStudio.Games.Scripts_BuiltToScaleRvl
void RemoveAndDestroy() void RemoveAndDestroy()
{ {
game.spawnedRods.Remove(this);
Destroy(gameObject); Destroy(gameObject);
} }
} }