Rhytm minigame base
This commit is contained in:
1 parent
258900d1d6
commit
329cc98ade
7696 files changed
+238891
-619017
No files matched your search
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: c6b29e598b23fb86ab8489c479625427
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: b113f67bc91e1581674910b7e68471ef
|
||||
Hash: 63b2b9527983aa3ba7f3464290077612
|
||||
m_ExtractTypeTreeData: 0
|
||||
m_DisableWriteTypeTree: 0
|
||||
m_OptimizeCatalogSize: 0
|
||||
@@ -110,6 +110,7 @@ MonoBehaviour:
|
||||
- SceneInfo
|
||||
- CleanTool
|
||||
- BattleAction
|
||||
- MusicMinigameTrack
|
||||
m_SchemaTemplates: []
|
||||
m_GroupTemplateObjects:
|
||||
- {fileID: 11400000, guid: 8c4ebef95ae1ef057bea1e3916daec48, type: 2}
|
||||
|
||||
@@ -73,6 +73,12 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2e08b9e928480db8a95dad08b4d9889d
|
||||
m_Address: Assets/OfficeGame/Minigames/MusicMinigame/Tracks/OverworldTest.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- MusicMinigameTrack
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2e21bba962bb10f53a41bb8aee11cbb2
|
||||
m_Address: Assets/Infrastructure/Audio/AudioSourcePrefab.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -123,6 +129,23 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- SceneInfo
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8d0107d04a35bdb05aac91fbe0250015
|
||||
m_Address: Assets/OfficeGame/Minigames/MusicMinigame/MusicMinigame.unity
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8fdf9175e3640300eb7d227e42da1a22
|
||||
m_Address: Assets/OfficeGame/Minigames/MusicMinigame/MusicMinigame.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- UIPanel
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: bd086dd02f7f70a31b2632a1d01e91af
|
||||
m_Address: Assets/OfficeGame/Minigames/MusicMinigame/MusicMinigameScene.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- SceneInfo
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c264e1992e55a8ea085838cebfc7eb6f
|
||||
m_Address: Assets/OfficeGame/Testing/Materials/Testing.mat
|
||||
m_ReadOnly: 0
|
||||
@@ -140,11 +163,21 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- SceneInfo
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d6ef95cfab02dac4dbee750cca673f4c
|
||||
m_Address: Assets/OfficeGame/Minigames/MusicMinigame/MusicMinigameConfig.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d88157a397b5e0f0face6979a2da1aec
|
||||
m_Address: Assets/OfficeGame/Player/PlayerFactorySettings.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: e14ec93c8278d6421aaf4c2a64d9f43e
|
||||
m_Address: Assets/OfficeGame/Minigames/MusicMinigame/MusicMinigamePanel.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: e5d11704b9c92c5e8a2d111e0f3f4727
|
||||
m_Address: Assets/OfficeGame/Battle/UI/BattleActionDecisionPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace Code.Game.TestingLevel
|
||||
|
||||
Context.InputService.BindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleBattleMode,
|
||||
ToggleBattleMode);
|
||||
Context.InputService.BindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleMinigames,
|
||||
ToggleMinigames);
|
||||
#endif
|
||||
|
||||
Context.InputService.EnableMap(ActionMappings.OpenMovement);
|
||||
@@ -52,7 +54,7 @@ namespace Code.Game.TestingLevel
|
||||
|
||||
await Context.Camera.SwitchState(CameraMode.OpenMovement);
|
||||
|
||||
if (Context.StateMachine.CurrentState == AppStates.BattleState) return;
|
||||
if (Context.StateMachine.CurrentState is AppStates.BattleState or AppStates.MusicMinigame) return;
|
||||
|
||||
Context.AudioService.SetAudioListener(Context.Camera.Camera.GetComponent<AudioListener>());
|
||||
|
||||
@@ -121,6 +123,11 @@ namespace Code.Game.TestingLevel
|
||||
playerMovementController.Freeze = false;
|
||||
}
|
||||
|
||||
private void ToggleMinigames(InputAction.CallbackContext obj)
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppStates.MusicMinigame).Forget();
|
||||
}
|
||||
|
||||
private void ToggleBattleMode(InputAction.CallbackContext obj)
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppStates.BattleState).Forget();
|
||||
@@ -132,10 +139,12 @@ namespace Code.Game.TestingLevel
|
||||
Context.InputService.DisableMap(ActionMappings.Debug);
|
||||
Context.InputService.UnbindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleBattleMode,
|
||||
ToggleBattleMode);
|
||||
Context.InputService.UnbindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleMinigames,
|
||||
ToggleMinigames);
|
||||
#endif
|
||||
Context.InputService.DisableMap(ActionMappings.OpenMovement);
|
||||
|
||||
if (Context.StateMachine.NextState == AppStates.BattleState) return;
|
||||
if (Context.StateMachine.NextState is AppStates.BattleState or AppStates.MusicMinigame) return;
|
||||
|
||||
await Context.SceneLoader.UnloadSceneAsync(SceneId.Testing);
|
||||
await Context.SceneLoader.UnloadSceneAsync(SceneId.FirstTestingSegment);
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Code.Infrastructure.Audio
|
||||
|
||||
source.Stop();
|
||||
source.resource = null;
|
||||
source.GetComponent<AudioSourceFollower>().FollowTarget = null;
|
||||
// source.GetComponent<AudioSourceFollower>().FollowTarget = null;
|
||||
//source.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
namespace Code.Infrastructure.Utils
|
||||
{
|
||||
using UnityEngine;
|
||||
using UnityEngine.Pool;
|
||||
|
||||
public class UltraGenericPool<T> where T : Component
|
||||
{
|
||||
public T Prefab;
|
||||
public int DefaultCapacity = 20;
|
||||
public int MaxSize = 100;
|
||||
public bool CollectionCheck = true;
|
||||
|
||||
private IObjectPool<T> _pool;
|
||||
|
||||
public UltraGenericPool()
|
||||
{
|
||||
_pool = new ObjectPool<T>(
|
||||
createFunc: CreateInstance,
|
||||
actionOnGet: OnGetFromPool,
|
||||
actionOnRelease: OnReleaseToPool,
|
||||
actionOnDestroy: OnDestroyPooledObject,
|
||||
collectionCheck: CollectionCheck,
|
||||
defaultCapacity: DefaultCapacity,
|
||||
maxSize: MaxSize
|
||||
);
|
||||
}
|
||||
|
||||
private T CreateInstance()
|
||||
{
|
||||
T instance = Object.Instantiate(Prefab);
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void OnGetFromPool(T instance)
|
||||
{
|
||||
instance.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
private void OnReleaseToPool(T instance)
|
||||
{
|
||||
instance.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnDestroyPooledObject(T instance)
|
||||
{
|
||||
if (instance != null)
|
||||
{
|
||||
Object.Destroy(instance.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public T Get() => _pool.Get();
|
||||
public void Release(T element) => _pool.Release(element);
|
||||
public void Clear() => _pool.Clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7296caebfaef4b8cbf63d563bce80536
|
||||
timeCreated: 1794698258
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1afbb20f15e64d968b9a64d44f6bc8b2
|
||||
timeCreated: 1794658858
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db637c07c9a14ebc90cdf25fd3c98906
|
||||
timeCreated: 1794658876
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
|
||||
public enum BeatType
|
||||
{
|
||||
Attack,
|
||||
Defense
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct BeatNode : IEquatable<BeatNode>
|
||||
{
|
||||
public int sampleIndex;
|
||||
public BeatType type;
|
||||
public int laneIndex;
|
||||
|
||||
public bool Equals(BeatNode other)
|
||||
{
|
||||
return sampleIndex == other.sampleIndex && type == other.type && laneIndex == other.laneIndex;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(sampleIndex, (int)type, laneIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 506777c42d2147028276b91d6e4d4408
|
||||
timeCreated: 1794669849
|
||||
@@ -0,0 +1,416 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Code.Game.Minigames.MusicGame.UI;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.Infrastructure.Utils;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Cysharp.Threading.Tasks.Triggers;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
public class BeatManager : IDisposable
|
||||
{
|
||||
private bool _isMounted;
|
||||
|
||||
private int _leadTimeSamples;
|
||||
private int _hitWindowSamples;
|
||||
|
||||
private AudioSource _beatSource;
|
||||
|
||||
private int _combo;
|
||||
private int _currentEnemyHealth, _maxEnemyHealth;
|
||||
private int _currentPlayerHealth;
|
||||
|
||||
private MusicMinigameTrackType _currentTrackType;
|
||||
private BeatNode[] _currentTrackBeats;
|
||||
|
||||
private Vector2 _beatNodeSize;
|
||||
|
||||
private readonly Dictionary<int, Queue<BeatNode>> _poppedOutBeats = new();
|
||||
private readonly Dictionary<BeatNode, Transform> _spawnedBeats = new();
|
||||
private readonly Dictionary<BeatType,UltraGenericPool<Transform>> _pools;
|
||||
|
||||
private int _nextBeatIndex;
|
||||
|
||||
private readonly Dictionary<MusicMinigameTrackType, MusicMinigameTrackConfig> _configs;
|
||||
private readonly IAudioSourcePool _audioSourcePool;
|
||||
private readonly MusicMinigamePanel _minigamePanel;
|
||||
private readonly MusicMinigameConfig _minigameConfig;
|
||||
private readonly IInputService _inputService;
|
||||
|
||||
private IDisposable _minigameDisposable;
|
||||
private CancellationTokenSource _minigameCancellationTokenSource;
|
||||
|
||||
public BeatManager(
|
||||
MultipleConfig<MusicMinigameTrackConfig> configs,
|
||||
IAudioSourcePool audioSourcePool,
|
||||
MusicMinigamePanel minigamePanel,
|
||||
SingleConfig<MusicMinigameConfig> minigameConfig,
|
||||
IInputService inputService)
|
||||
{
|
||||
_inputService = inputService;
|
||||
_minigameConfig = minigameConfig.Config;
|
||||
_minigamePanel = minigamePanel;
|
||||
_audioSourcePool = audioSourcePool;
|
||||
|
||||
_beatSource = audioSourcePool.GetSource(AudioSourceType.Full3D);
|
||||
_configs = configs.Configs.ToDictionary(x => x.Type);
|
||||
|
||||
_pools = new();
|
||||
|
||||
foreach (var (beatType, prefab) in _minigameConfig.beatPrefabs)
|
||||
{
|
||||
_pools[beatType] = new();
|
||||
_pools[beatType].Prefab = prefab;
|
||||
|
||||
Debug.Log($"Created pool {beatType}");
|
||||
}
|
||||
|
||||
_isMounted = false;
|
||||
}
|
||||
|
||||
public void Mount(int maxPlayerHealth)
|
||||
{
|
||||
if (_isMounted) return;
|
||||
|
||||
_combo = 0;
|
||||
_nextBeatIndex = 0;
|
||||
_currentPlayerHealth = maxPlayerHealth;
|
||||
|
||||
_inputService.BindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.AttackLeft, AttackingHitLeft);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.AttackUp, AttackingHitUp);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.AttackDown, AttackingHitDown);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.AttackRight, AttackingHitRight);
|
||||
|
||||
_inputService.BindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.DefendLeft, DefendingHitLeft);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.DefendUp, DefendingHitUp);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.DefendDown, DefendingHitDown);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.DefendRight, DefendingHitRight);
|
||||
|
||||
_isMounted = true;
|
||||
}
|
||||
|
||||
public void Unmount()
|
||||
{
|
||||
if (!_isMounted) return;
|
||||
|
||||
StopPlayInternal();
|
||||
|
||||
_combo = 0;
|
||||
_currentPlayerHealth = 0;
|
||||
_maxEnemyHealth = 0;
|
||||
_currentEnemyHealth = 0;
|
||||
_nextBeatIndex = 0;
|
||||
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.AttackLeft, AttackingHitLeft);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.AttackUp, AttackingHitUp);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.AttackDown, AttackingHitDown);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.AttackRight, AttackingHitRight);
|
||||
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.DefendLeft, DefendingHitLeft);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.DefendUp, DefendingHitUp);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.DefendDown, DefendingHitDown);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.MusicMinigame, (int)MisucMinigameActions.DefendRight, DefendingHitRight);
|
||||
|
||||
_isMounted = false;
|
||||
}
|
||||
|
||||
private void AttackingHitLeft(InputAction.CallbackContext obj) => TryHitLane(0,true);
|
||||
private void AttackingHitUp(InputAction.CallbackContext obj) => TryHitLane(1,true);
|
||||
private void AttackingHitDown(InputAction.CallbackContext obj) => TryHitLane(2, true);
|
||||
private void AttackingHitRight(InputAction.CallbackContext obj) => TryHitLane(3, true);
|
||||
|
||||
private void DefendingHitLeft(InputAction.CallbackContext obj) => TryHitLane(0,false);
|
||||
private void DefendingHitUp(InputAction.CallbackContext obj) => TryHitLane(1,false);
|
||||
private void DefendingHitDown(InputAction.CallbackContext obj) => TryHitLane(2, false);
|
||||
private void DefendingHitRight(InputAction.CallbackContext obj) => TryHitLane(3, false);
|
||||
|
||||
private void TryHitLane(int laneIndex, bool isAttacking)
|
||||
{
|
||||
if (!_poppedOutBeats.TryGetValue(laneIndex, out var queue) || queue.Count == 0) return;
|
||||
|
||||
ResolveBeat(queue, isTimeoutMiss: false, attackingHit: isAttacking);
|
||||
}
|
||||
|
||||
public void StartPlay(MusicMinigameTrackType trackType)
|
||||
{
|
||||
if (!_isMounted) throw new InvalidOperationException("Music minigame is not mounted");
|
||||
|
||||
StopPlayInternal();
|
||||
|
||||
_minigameCancellationTokenSource = new CancellationTokenSource();
|
||||
_currentTrackType = trackType;
|
||||
|
||||
var trackConfig = _configs[_currentTrackType];
|
||||
|
||||
_currentTrackBeats = BitwigMidiUtility.ParseMidi(
|
||||
trackConfig.midiFile.bytes,
|
||||
trackConfig.Clip.frequency,
|
||||
trackConfig.bpm,
|
||||
40,
|
||||
36,
|
||||
4);
|
||||
|
||||
Debug.Log($"Read {trackConfig.midiFile.bytes} bytes got {_currentTrackBeats.Length} beats");
|
||||
|
||||
_leadTimeSamples = trackConfig.leadTimeSamples;
|
||||
_hitWindowSamples = trackConfig.hitWindowSamples;
|
||||
|
||||
var beatLine = _minigamePanel.BeatLines.FirstOrDefault();
|
||||
|
||||
// nullpointer Бомба
|
||||
var beatLineVector = beatLine.StartPosition - beatLine.SpotPosition;
|
||||
|
||||
float nodeBoxSize = (_hitWindowSamples / (float) _leadTimeSamples) * beatLineVector.magnitude;
|
||||
|
||||
_minigamePanel.BeatLineZone.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, nodeBoxSize);
|
||||
|
||||
Vector3 beatLineZonePosition = _minigamePanel.BeatLineZone.position;
|
||||
|
||||
beatLineZonePosition.y = beatLine.SpotPosition.y;
|
||||
|
||||
_minigamePanel.BeatLineZone.position = beatLineZonePosition;
|
||||
|
||||
_beatNodeSize = new(75, nodeBoxSize);
|
||||
|
||||
// ((RectTransform)prefab).SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, );
|
||||
|
||||
_maxEnemyHealth = trackConfig.maxEnemyHealth;
|
||||
_currentEnemyHealth = _maxEnemyHealth;
|
||||
_nextBeatIndex = 0;
|
||||
|
||||
_minigamePanel.EnemyHealth.SetEnemyHealth(_currentEnemyHealth/(float)_maxEnemyHealth);
|
||||
|
||||
_minigamePanel.PlayerHealth.SetHealth(_currentPlayerHealth);
|
||||
|
||||
_minigamePanel.MusicMinigameComboText.SetComboText(_combo).Forget();
|
||||
|
||||
_beatSource.clip = trackConfig.Clip;
|
||||
_beatSource.Play();
|
||||
|
||||
PollBeatsAsync(_minigameCancellationTokenSource.Token).Forget();
|
||||
}
|
||||
|
||||
private async UniTaskVoid PollBeatsAsync(CancellationToken ct)
|
||||
{
|
||||
while (!ct.IsCancellationRequested)
|
||||
{
|
||||
bool isCancelled = await UniTask.Yield(PlayerLoopTiming.Update, ct).SuppressCancellationThrow();
|
||||
if (isCancelled) return;
|
||||
|
||||
if (!_beatSource.isPlaying) continue;
|
||||
|
||||
int currentSample = _beatSource.timeSamples;
|
||||
|
||||
while (BeatTimelineUtility.TryPopNextBeat(
|
||||
_currentTrackBeats,
|
||||
currentSample,
|
||||
_leadTimeSamples,
|
||||
ref _nextBeatIndex,
|
||||
out var nextBeat))
|
||||
{
|
||||
SpawnBeat(nextBeat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PollBeats()
|
||||
{
|
||||
int currentSample = _beatSource.timeSamples;
|
||||
|
||||
while (BeatTimelineUtility.TryPopNextBeat(
|
||||
_currentTrackBeats,
|
||||
currentSample,
|
||||
_leadTimeSamples,
|
||||
ref _nextBeatIndex,
|
||||
out var nextBeat))
|
||||
{
|
||||
SpawnBeat(nextBeat);
|
||||
}
|
||||
}
|
||||
|
||||
private void SpawnBeat(BeatNode nextBeat)
|
||||
{
|
||||
if (!_poppedOutBeats.TryGetValue(nextBeat.laneIndex, out var beatQueue))
|
||||
{
|
||||
beatQueue = new Queue<BeatNode>();
|
||||
_poppedOutBeats[nextBeat.laneIndex] = beatQueue;
|
||||
}
|
||||
|
||||
beatQueue.Enqueue(nextBeat);
|
||||
|
||||
var beatLine = _minigamePanel.BeatLines[nextBeat.laneIndex];
|
||||
var beat = _pools[nextBeat.type].Get();
|
||||
|
||||
beat.SetParent(beatLine.transform, false);
|
||||
beat.position = beatLine.StartPosition;
|
||||
|
||||
((RectTransform)beat).sizeDelta = _beatNodeSize;
|
||||
|
||||
_spawnedBeats[nextBeat] = beat;
|
||||
|
||||
RunBeat(nextBeat, beat, beatLine, _minigameCancellationTokenSource.Token).Forget();
|
||||
}
|
||||
|
||||
private async UniTaskVoid RunBeat(
|
||||
BeatNode node,
|
||||
Transform beatTransform,
|
||||
BeatLine beatLine,
|
||||
CancellationToken ct)
|
||||
{
|
||||
int missSample = node.sampleIndex + _hitWindowSamples;// / 2;
|
||||
|
||||
while (!ct.IsCancellationRequested && _beatSource.timeSamples <= missSample)
|
||||
{
|
||||
bool isCancelled = await UniTask.Yield(PlayerLoopTiming.Update, ct).SuppressCancellationThrow();
|
||||
if (isCancelled || !beatTransform) return;
|
||||
|
||||
if (!_spawnedBeats.ContainsKey(node)) return;
|
||||
|
||||
float progress = BeatTimelineUtility.GetNormalizedApproachProgress(
|
||||
_beatSource.timeSamples,
|
||||
node.sampleIndex,
|
||||
_leadTimeSamples);
|
||||
|
||||
beatTransform.position = Vector3.LerpUnclamped(
|
||||
beatLine.StartPosition,
|
||||
beatLine.SpotPosition,
|
||||
progress);
|
||||
}
|
||||
|
||||
if (ct.IsCancellationRequested || !_spawnedBeats.ContainsKey(node)) return;
|
||||
|
||||
if (!_poppedOutBeats.TryGetValue(node.laneIndex, out var queue) || queue.Count <= 0) return;
|
||||
|
||||
ResolveBeat(queue, isTimeoutMiss: true, false);
|
||||
}
|
||||
|
||||
private void ResolveBeat(Queue<BeatNode> queue, bool isTimeoutMiss, bool attackingHit)
|
||||
{
|
||||
bool inTimeWindow = !isTimeoutMiss;
|
||||
bool canBeDeleted = true;
|
||||
|
||||
BeatNode node = isTimeoutMiss ? queue.Dequeue() : queue.Peek();
|
||||
|
||||
if (inTimeWindow)
|
||||
{
|
||||
inTimeWindow = BeatTimelineUtility.IsWithinHitWindow(
|
||||
_beatSource.timeSamples,
|
||||
node.sampleIndex,
|
||||
_hitWindowSamples,
|
||||
out int error);
|
||||
|
||||
if (!inTimeWindow && error < 0)
|
||||
{
|
||||
Debug.Log("Cannot be deleted");
|
||||
canBeDeleted = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Can be deleted");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Will be deleted");
|
||||
}
|
||||
|
||||
Transform beatTransform = null;
|
||||
|
||||
if (canBeDeleted)
|
||||
if (!_spawnedBeats.Remove(node, out beatTransform)) return;
|
||||
|
||||
bool isCorrectStance = attackingHit
|
||||
? node.type == BeatType.Attack
|
||||
: node.type == BeatType.Defense;
|
||||
|
||||
if (!inTimeWindow || !isCorrectStance) HitMistake(node);
|
||||
else SuccesfulHit(node);
|
||||
|
||||
if(canBeDeleted && beatTransform != null)
|
||||
{
|
||||
if(!isTimeoutMiss) queue.Dequeue();
|
||||
|
||||
_pools[node.type].Release(beatTransform);
|
||||
}
|
||||
}
|
||||
|
||||
private void HitMistake(BeatNode node)
|
||||
{
|
||||
_combo = 0;
|
||||
_minigamePanel.MusicMinigameComboText.SetComboText(_combo).Forget();
|
||||
|
||||
if (node.type == BeatType.Defense)
|
||||
{
|
||||
_currentPlayerHealth--;
|
||||
|
||||
_minigamePanel.PlayerHealth.DecreaseHealth();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SuccesfulHit(BeatNode node)
|
||||
{
|
||||
_combo++;
|
||||
_minigamePanel.MusicMinigameComboText.SetComboText(_combo).Forget();
|
||||
|
||||
if (node.type == BeatType.Attack)
|
||||
{
|
||||
_currentEnemyHealth = Mathf.Max(0, _currentEnemyHealth - _combo);
|
||||
float healthPercent = _maxEnemyHealth > 0
|
||||
? (float)_currentEnemyHealth / _maxEnemyHealth
|
||||
: 0f;
|
||||
|
||||
_minigamePanel.EnemyHealth.SetEnemyHealth(healthPercent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void GameOver()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StopPlayInternal()
|
||||
{
|
||||
_minigameDisposable?.Dispose();
|
||||
_minigameDisposable = null;
|
||||
|
||||
if (_minigameCancellationTokenSource != null)
|
||||
{
|
||||
_minigameCancellationTokenSource.Cancel();
|
||||
_minigameCancellationTokenSource.Dispose();
|
||||
_minigameCancellationTokenSource = null;
|
||||
}
|
||||
|
||||
if (_beatSource && _beatSource.isPlaying)
|
||||
_beatSource.Stop();
|
||||
|
||||
foreach (var (node, beat) in _spawnedBeats)
|
||||
{
|
||||
_pools[node.type].Release(beat);
|
||||
}
|
||||
|
||||
_spawnedBeats.Clear();
|
||||
_poppedOutBeats.Clear();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Unmount();
|
||||
|
||||
foreach (var (_, pool) in _pools)
|
||||
{
|
||||
pool.Clear();
|
||||
}
|
||||
|
||||
_pools.Clear();
|
||||
_audioSourcePool.ReleaseSource(_beatSource);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a475c060be054ad08b76afd33cdb5d69
|
||||
timeCreated: 1794674475
|
||||
@@ -0,0 +1,10 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
public class BeatSeems : MonoBehaviour
|
||||
{
|
||||
public TMP_Text beatText;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f197cd566974606a49ec121033f81ff
|
||||
timeCreated: 1794754948
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
public static class BeatTimelineUtility
|
||||
{
|
||||
// Перевод секунд (например, времени подлета ноты) в семплы
|
||||
public static int SecondsToSamples(float seconds, int sampleRate)
|
||||
{
|
||||
return (int)Math.Round(seconds * sampleRate);
|
||||
}
|
||||
|
||||
// Извлекает все биты, которым пора заспавниться на текущем семпле.
|
||||
// Вызывается в цикле while в Update, передвигая внешний индекс nextBeatIndex.
|
||||
public static bool TryPopNextBeat(
|
||||
BeatNode[] beatMap,
|
||||
int currentSample,
|
||||
int leadTimeSamples,
|
||||
ref int nextBeatIndex,
|
||||
out BeatNode beat)
|
||||
{
|
||||
if (beatMap != null &&
|
||||
nextBeatIndex < beatMap.Length &&
|
||||
(nextBeatIndex == 0
|
||||
|| currentSample >= beatMap[nextBeatIndex].sampleIndex - leadTimeSamples))
|
||||
{
|
||||
beat = beatMap[nextBeatIndex];
|
||||
nextBeatIndex++;
|
||||
return true;
|
||||
}
|
||||
|
||||
beat = default;
|
||||
return false;
|
||||
}
|
||||
public static bool TryDefineNextBeat(
|
||||
int currentSample,
|
||||
BeatNode[] beatMap,
|
||||
int leadTimeSamples,
|
||||
ref int nextBeatIndex)
|
||||
{
|
||||
if (beatMap != null &&
|
||||
nextBeatIndex < beatMap.Length &&
|
||||
(nextBeatIndex == 0
|
||||
|| currentSample >= beatMap[nextBeatIndex].sampleIndex - leadTimeSamples))
|
||||
{
|
||||
nextBeatIndex++;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Возвращает нормализованный прогресс движения ноты по дорожке:
|
||||
// 0.0f — точка спавна, 1.0f — линия удара, больше 1.0f — нота пролетела за линию удара
|
||||
public static float GetNormalizedApproachProgress(int currentSample, int targetSample, int leadTimeSamples)
|
||||
{
|
||||
if (leadTimeSamples <= 0) return 1f;
|
||||
int spawnSample = targetSample - leadTimeSamples;
|
||||
return (currentSample - spawnSample) / (float)leadTimeSamples;
|
||||
}
|
||||
|
||||
// Проверяет, попал ли игрок в окно тайминга (например, +-50 мс от targetSample)
|
||||
public static bool IsWithinHitWindow(
|
||||
int currentSample,
|
||||
int targetSample,
|
||||
int hitWindowSamples,
|
||||
out int signedSampleError)
|
||||
{
|
||||
signedSampleError = currentSample - targetSample;
|
||||
int absError = signedSampleError < 0 ? -signedSampleError : signedSampleError;
|
||||
return absError <= hitWindowSamples;
|
||||
}
|
||||
|
||||
// Принудительный поиск индекса ближайшего будущего бита (полезно при перемотке трека)
|
||||
public static int FindBeatIndexAtSample(BeatNode[] beatMap, int currentSample, int leadTimeSamples)
|
||||
{
|
||||
if (beatMap == null || beatMap.Length == 0) return 0;
|
||||
|
||||
int targetSpawnThreshold = currentSample + leadTimeSamples;
|
||||
int low = 0;
|
||||
int high = beatMap.Length - 1;
|
||||
|
||||
while (low <= high)
|
||||
{
|
||||
int mid = low + ((high - low) >> 1);
|
||||
if (beatMap[mid].sampleIndex < targetSpawnThreshold)
|
||||
low = mid + 1;
|
||||
else
|
||||
high = mid - 1;
|
||||
}
|
||||
|
||||
return low;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e37c2d1dfb5e432ca576522dbe2312d7
|
||||
timeCreated: 1794670392
|
||||
@@ -0,0 +1,230 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
public static class BitwigMidiUtility
|
||||
{
|
||||
private struct RawNote
|
||||
{
|
||||
public long tick;
|
||||
public int noteNumber;
|
||||
}
|
||||
|
||||
private struct TempoChange
|
||||
{
|
||||
public long tick;
|
||||
public int microsecondsPerQuarterNote;
|
||||
}
|
||||
|
||||
public static BeatNode[] ParseMidi(
|
||||
byte[] midiBytes,
|
||||
int sampleRate,
|
||||
double fallbackBpm = 120.0,
|
||||
int attackBaseNote = 60,
|
||||
int defenseBaseNote = 72,
|
||||
int maxLanes = 12)
|
||||
{
|
||||
if (midiBytes == null || midiBytes.Length < 14)
|
||||
return Array.Empty<BeatNode>();
|
||||
|
||||
int offset = 0;
|
||||
|
||||
// Проверка заголовка "MThd" (0x4D546864)
|
||||
if (ReadInt32BigEndian(midiBytes, ref offset) != 0x4D546864)
|
||||
throw new ArgumentException("Некорректный заголовок MIDI-файла (ожидался MThd).");
|
||||
|
||||
int headerLength = ReadInt32BigEndian(midiBytes, ref offset);
|
||||
int headerEnd = offset + headerLength;
|
||||
|
||||
ReadUInt16BigEndian(midiBytes, ref offset); // Формат MIDI (0 или 1)
|
||||
int tracksCount = ReadUInt16BigEndian(midiBytes, ref offset);
|
||||
int division = ReadUInt16BigEndian(midiBytes, ref offset);
|
||||
|
||||
if ((division & 0x8000) != 0)
|
||||
throw new NotSupportedException(
|
||||
"SMPTE таймкод не поддерживается, используйте стандартный PPQ в Bitwig.");
|
||||
|
||||
int ticksPerQuarterNote = division;
|
||||
offset = headerEnd;
|
||||
|
||||
List<RawNote> rawNotes = new List<RawNote>(256);
|
||||
List<TempoChange> tempoMap = new List<TempoChange>(8);
|
||||
|
||||
for (int t = 0; t < tracksCount && offset + 8 <= midiBytes.Length; t++)
|
||||
{
|
||||
int chunkId = ReadInt32BigEndian(midiBytes, ref offset);
|
||||
int chunkLength = ReadInt32BigEndian(midiBytes, ref offset);
|
||||
int trackEnd = offset + chunkLength;
|
||||
|
||||
// Пропускаем нестандартные чанки, если это не "MTrk" (0x4D54726B)
|
||||
if (chunkId != 0x4D54726B)
|
||||
{
|
||||
offset = trackEnd;
|
||||
continue;
|
||||
}
|
||||
|
||||
long currentTick = 0;
|
||||
byte runningStatus = 0;
|
||||
|
||||
while (offset < trackEnd)
|
||||
{
|
||||
currentTick += ReadVarLen(midiBytes, ref offset);
|
||||
byte status = midiBytes[offset];
|
||||
|
||||
if (status < 0x80)
|
||||
{
|
||||
status = runningStatus;
|
||||
}
|
||||
else
|
||||
{
|
||||
offset++;
|
||||
if (status < 0xF0)
|
||||
runningStatus = status;
|
||||
}
|
||||
|
||||
int messageType = status & 0xF0;
|
||||
|
||||
if (messageType == 0x90) // Note On
|
||||
{
|
||||
byte note = midiBytes[offset++];
|
||||
byte velocity = midiBytes[offset++];
|
||||
|
||||
if (velocity > 0)
|
||||
{
|
||||
rawNotes.Add(new RawNote { tick = currentTick, noteNumber = note });
|
||||
}
|
||||
}
|
||||
else if (messageType == 0x80 || messageType == 0xA0 || messageType == 0xB0 || messageType == 0xE0)
|
||||
{
|
||||
offset += 2;
|
||||
}
|
||||
else if (messageType == 0xC0 || messageType == 0xD0)
|
||||
{
|
||||
offset += 1;
|
||||
}
|
||||
else if (status == 0xFF) // Meta Event
|
||||
{
|
||||
byte metaType = midiBytes[offset++];
|
||||
int metaLength = (int)ReadVarLen(midiBytes, ref offset);
|
||||
|
||||
// 0x51 = Set Tempo (3 байта: микросекунды на четвертную ноту)
|
||||
if (metaType == 0x51 && metaLength == 3)
|
||||
{
|
||||
int mpqn = (midiBytes[offset] << 16) | (midiBytes[offset + 1] << 8) | midiBytes[offset + 2];
|
||||
tempoMap.Add(new TempoChange { tick = currentTick, microsecondsPerQuarterNote = mpqn });
|
||||
}
|
||||
|
||||
offset += metaLength;
|
||||
}
|
||||
else if (status == 0xF0 || status == 0xF7) // SysEx
|
||||
{
|
||||
int sysexLength = (int)ReadVarLen(midiBytes, ref offset);
|
||||
offset += sysexLength;
|
||||
}
|
||||
}
|
||||
|
||||
offset = trackEnd;
|
||||
}
|
||||
|
||||
tempoMap.Sort((a, b) => a.tick.CompareTo(b.tick));
|
||||
int defaultMpqn = (int)Math.Round(60_000_000.0 / fallbackBpm);
|
||||
|
||||
List<BeatNode> beatNodes = new List<BeatNode>(rawNotes.Count);
|
||||
|
||||
for (int i = 0; i < rawNotes.Count; i++)
|
||||
{
|
||||
RawNote raw = rawNotes[i];
|
||||
BeatType type;
|
||||
int lane;
|
||||
|
||||
if (raw.noteNumber >= attackBaseNote && raw.noteNumber < attackBaseNote + maxLanes)
|
||||
{
|
||||
type = BeatType.Attack;
|
||||
lane = raw.noteNumber - attackBaseNote;
|
||||
}
|
||||
else if (raw.noteNumber >= defenseBaseNote && raw.noteNumber < defenseBaseNote + maxLanes)
|
||||
{
|
||||
type = BeatType.Defense;
|
||||
lane = raw.noteNumber - defenseBaseNote;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
double timeSeconds = TicksToSeconds(raw.tick, ticksPerQuarterNote, tempoMap, defaultMpqn);
|
||||
int sampleIndex = (int)Math.Round(timeSeconds * sampleRate);
|
||||
|
||||
beatNodes.Add(new BeatNode
|
||||
{
|
||||
sampleIndex = sampleIndex,
|
||||
type = type,
|
||||
laneIndex = lane
|
||||
});
|
||||
}
|
||||
|
||||
beatNodes.Sort((a, b) => a.sampleIndex.CompareTo(b.sampleIndex));
|
||||
return beatNodes.ToArray();
|
||||
}
|
||||
|
||||
private static double TicksToSeconds(long targetTick, int ticksPerQuarterNote, List<TempoChange> tempoMap,
|
||||
int defaultMpqn)
|
||||
{
|
||||
double totalSeconds = 0.0;
|
||||
long lastTick = 0;
|
||||
int currentMpqn = defaultMpqn;
|
||||
|
||||
for (int i = 0; i < tempoMap.Count; i++)
|
||||
{
|
||||
TempoChange change = tempoMap[i];
|
||||
if (change.tick >= targetTick)
|
||||
break;
|
||||
|
||||
long deltaTicks = change.tick - lastTick;
|
||||
if (deltaTicks > 0)
|
||||
{
|
||||
totalSeconds += (deltaTicks / (double)ticksPerQuarterNote) * (currentMpqn / 1_000_000.0);
|
||||
lastTick = change.tick;
|
||||
}
|
||||
|
||||
currentMpqn = change.microsecondsPerQuarterNote;
|
||||
}
|
||||
|
||||
long remainingTicks = targetTick - lastTick;
|
||||
if (remainingTicks > 0)
|
||||
{
|
||||
totalSeconds += (remainingTicks / (double)ticksPerQuarterNote) * (currentMpqn / 1_000_000.0);
|
||||
}
|
||||
|
||||
return totalSeconds;
|
||||
}
|
||||
|
||||
private static int ReadInt32BigEndian(byte[] data, ref int offset)
|
||||
{
|
||||
int value = (data[offset] << 24) | (data[offset + 1] << 16) | (data[offset + 2] << 8) | data[offset + 3];
|
||||
offset += 4;
|
||||
return value;
|
||||
}
|
||||
|
||||
private static int ReadUInt16BigEndian(byte[] data, ref int offset)
|
||||
{
|
||||
int value = (data[offset] << 8) | data[offset + 1];
|
||||
offset += 2;
|
||||
return value;
|
||||
}
|
||||
|
||||
private static long ReadVarLen(byte[] data, ref int offset)
|
||||
{
|
||||
long value = 0;
|
||||
byte b;
|
||||
do
|
||||
{
|
||||
b = data[offset++];
|
||||
value = (value << 7) | (uint)(b & 0x7F);
|
||||
} while ((b & 0x80) != 0);
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 197cdb075ed1495bbcbbccd933f7806c
|
||||
timeCreated: 1794669948
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using Code.Infrastructure.Generators;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
[Config("Configs/Music Minigame Config")]
|
||||
[CreateAssetMenu(fileName = "MusicMinigameConfig", menuName = "Configs/Music Minigame Config")]
|
||||
public class MusicMinigameConfig : ScriptableObject
|
||||
{
|
||||
// public Transform beatPrefab;
|
||||
|
||||
[SerializeField] public Dictionary<BeatType, Transform> beatPrefabs;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac1e8cb247f54fceb18065f749bb513c
|
||||
timeCreated: 1794675969
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using R3;
|
||||
using Reflex.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
public class MusicMinigameSceneInstaller: MonoBehaviour, IInstaller
|
||||
{
|
||||
private IDisposable _onContainerBuildDisposable;
|
||||
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
_onContainerBuildDisposable = Observable
|
||||
.FromEvent<Container>(
|
||||
h => containerBuilder.OnContainerBuilt += h,
|
||||
h => containerBuilder.OnContainerBuilt -= h)
|
||||
.Subscribe(x => OnContainerBuilt(x).Forget());
|
||||
}
|
||||
|
||||
private ISceneContainerManager _sceneContainerManager;
|
||||
private async UniTaskVoid OnContainerBuilt(Container container)
|
||||
{
|
||||
await UniTask.Yield();
|
||||
|
||||
_onContainerBuildDisposable.Dispose();
|
||||
|
||||
_sceneContainerManager = container.Resolve<ISceneContainerManager>();
|
||||
_sceneContainerManager.ScenesContainers.Add(SceneId.MusicMinigame, container);
|
||||
}
|
||||
|
||||
public void OnDestroy()
|
||||
{
|
||||
_sceneContainerManager.ScenesContainers.Remove(SceneId.MusicMinigame);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edefcd12d6e34b4095a4ce2db069073d
|
||||
timeCreated: 1794658908
|
||||
@@ -0,0 +1,106 @@
|
||||
using Code.Infrastructure.App;
|
||||
using Code.Infrastructure.Generators;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.Utils;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using ObservableCollections;
|
||||
using R3;
|
||||
using Reflex.Core;
|
||||
using Reflex.Enums;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
[State(typeof(AppStates), typeof(AppStateMachineContext))]
|
||||
public partial class MusicMinigameState
|
||||
{
|
||||
public MusicMinigameState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override AppStates MyState => AppStates.MusicMinigame;
|
||||
|
||||
public override async UniTask EnterState()
|
||||
{
|
||||
Context.InputService.EnableMap(ActionMappings.MusicMinigame);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Context.InputService.EnableMap(ActionMappings.Debug);
|
||||
|
||||
Context.InputService.BindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleMinigames,
|
||||
ToggleMinigames);
|
||||
#endif
|
||||
// await Context.Camera.SwitchState(CameraMode.None);
|
||||
|
||||
var waitForContainer =
|
||||
Context.SceneContainerManager.ScenesContainers
|
||||
.ObserveDictionaryAdd()
|
||||
.Where(x => x.Key == SceneId.MusicMinigame)
|
||||
.Take(1)
|
||||
.WaitAsync()
|
||||
.AsUniTask();
|
||||
|
||||
var gameplayContainer = Context.SceneContainerManager.ScenesContainers[SceneId.Testing];
|
||||
|
||||
var musicTrackConfigs = new MultipleConfig<MusicMinigameTrackConfig>();
|
||||
var minigameConfig = new SingleConfig<MusicMinigameConfig>();
|
||||
|
||||
await UniTask.WhenAll(
|
||||
musicTrackConfigs.LoadConfigs(),
|
||||
minigameConfig.LoadConfig()
|
||||
);
|
||||
|
||||
var panelLoading = await Context.UIFactory.LoadPanel(UIPanelType.MusicMinigame, false);
|
||||
|
||||
await UniTask.WhenAll(
|
||||
Context.SceneLoader
|
||||
.LoadSceneAsync(
|
||||
SceneId.MusicMinigame,
|
||||
LoadSceneMode.Additive,
|
||||
true,
|
||||
InstallExtra),
|
||||
waitForContainer
|
||||
);
|
||||
|
||||
var container = Context.SceneContainerManager.ScenesContainers[SceneId.MusicMinigame];
|
||||
|
||||
var beatManager = container.Resolve<BeatManager>();
|
||||
|
||||
beatManager.Mount(3);
|
||||
|
||||
beatManager.StartPlay(MusicMinigameTrackType.OverworldDefault);
|
||||
|
||||
|
||||
void InstallExtra(Scene scene, ContainerBuilder builder)
|
||||
{
|
||||
builder.SetParent(gameplayContainer);
|
||||
|
||||
builder.RegisterValue(musicTrackConfigs);
|
||||
builder.RegisterValue(minigameConfig);
|
||||
builder.RegisterValue(panelLoading);
|
||||
|
||||
builder.RegisterType(typeof(BeatManager), Lifetime.Singleton, Resolution.Eager);
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleMinigames(InputAction.CallbackContext obj)
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppStates.Testing).Forget();
|
||||
}
|
||||
|
||||
public override async UniTask ExitState()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
Context.InputService.DisableMap(ActionMappings.Debug);
|
||||
Context.InputService.UnbindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleMinigames,
|
||||
ToggleMinigames);
|
||||
#endif
|
||||
Context.InputService.DisableMap(ActionMappings.MusicMinigame);
|
||||
|
||||
await Context.SceneLoader.UnloadSceneAsync(SceneId.MusicMinigame);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f66c4511c7084da3b103335ba43e0963
|
||||
timeCreated: 1794658894
|
||||
@@ -0,0 +1,20 @@
|
||||
using Code.Infrastructure.Generators;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
[Config("Configs/Minigame Track Config", true)]
|
||||
[CreateAssetMenu(fileName = "MinigameTrackConfig", menuName = "Configs/Minigame Track Config")]
|
||||
public class MusicMinigameTrackConfig : ScriptableObject
|
||||
{
|
||||
public MusicMinigameTrackType Type;
|
||||
|
||||
public AudioClip Clip;
|
||||
public int hitWindowSamples;
|
||||
public int leadTimeSamples;
|
||||
public TextAsset midiFile;
|
||||
|
||||
public int bpm;
|
||||
public int maxEnemyHealth;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb7b46e42e7d43e5a883d60a072d5fe1
|
||||
timeCreated: 1794674756
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Code.Game.Minigames.MusicGame
|
||||
{
|
||||
public enum MusicMinigameTrackType
|
||||
{
|
||||
OverworldDefault
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccf201beab9840f18d8affca3a4f0baa
|
||||
timeCreated: 1794675058
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ded13bd2fa6b4ffd828ca291993672f0
|
||||
timeCreated: 1794671154
|
||||
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame.UI
|
||||
{
|
||||
public class BeatLine : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Transform startPosition;
|
||||
[SerializeField] private Transform spotPosition;
|
||||
|
||||
public Vector3 StartPosition => startPosition.position;
|
||||
public Vector3 SpotPosition => spotPosition.position;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5b224e8ccea4322bbe71c479a72582f
|
||||
timeCreated: 1794690076
|
||||
@@ -0,0 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame.UI
|
||||
{
|
||||
public class BeatLineZone : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d93103cfed541bd9580655c518a2496
|
||||
timeCreated: 1794778337
|
||||
@@ -0,0 +1,26 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using LitMotion;
|
||||
using LitMotion.Extensions;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame.UI
|
||||
{
|
||||
public class MusicMinigameComboText : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_Text comboText;
|
||||
|
||||
[SerializeField] private float shakeStrength;
|
||||
[SerializeField] private float shakeDuration;
|
||||
|
||||
public async UniTaskVoid SetComboText(int combo)
|
||||
{
|
||||
LMotion.Shake
|
||||
.Create(1, shakeStrength, shakeDuration)
|
||||
.BindToLocalScaleXYZ(comboText.transform);
|
||||
|
||||
// StringBuilder
|
||||
comboText.SetText('x' + combo.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5f82f4d138540fdb4a8e050e53a5924
|
||||
timeCreated: 1794695037
|
||||
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame.UI
|
||||
{
|
||||
public class MusicMinigameEnemyHealth : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Image health;
|
||||
|
||||
public void SetEnemyHealth(float healthPercent)
|
||||
{
|
||||
health.fillAmount = healthPercent;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5079a8f7043e457490e20a72a13926a5
|
||||
timeCreated: 1794694475
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Alchemy.Inspector;
|
||||
using Code.Infrastructure.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using LitMotion;
|
||||
using LitMotion.Extensions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame.UI
|
||||
{
|
||||
public class MusicMinigamePanel : UIPanel
|
||||
{
|
||||
[TabGroup("OpenClose")]
|
||||
[SerializeField] private CanvasGroup canvasGroup;
|
||||
[TabGroup("OpenClose")]
|
||||
[SerializeField] private float leadTime;
|
||||
[TabGroup("OpenClose")]
|
||||
[SerializeField] private float starterScale;
|
||||
|
||||
[TabGroup("SubElements")]
|
||||
[SerializeField] private BeatLine[] beatLines;
|
||||
[TabGroup("SubElements")]
|
||||
[SerializeField] private MusicMinigamePlayerHealth playerHealth;
|
||||
[TabGroup("SubElements")]
|
||||
[SerializeField] private MusicMinigameEnemyHealth enemyHealth;
|
||||
[TabGroup("SubElements")]
|
||||
[SerializeField] private MusicMinigameComboText comboText;
|
||||
[TabGroup("SubElements")]
|
||||
[SerializeField] private RectTransform beatLineZone;
|
||||
|
||||
public ReadOnlyArray<BeatLine> BeatLines { get; private set; }
|
||||
public MusicMinigamePlayerHealth PlayerHealth => playerHealth;
|
||||
public MusicMinigameEnemyHealth EnemyHealth => enemyHealth;
|
||||
public MusicMinigameComboText MusicMinigameComboText => comboText;
|
||||
public RectTransform BeatLineZone => beatLineZone;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
BeatLines = beatLines;
|
||||
}
|
||||
|
||||
public override async UniTask Open(CancellationToken cts = default)
|
||||
{
|
||||
var canvasGroupMotion = LMotion
|
||||
.Create(0, 1f, leadTime)
|
||||
.BindToAlpha(canvasGroup);
|
||||
|
||||
var scale = LMotion
|
||||
.Create(starterScale, 1f, leadTime)
|
||||
.WithEase(Ease.InBounce)
|
||||
.BindToLocalScaleXYZ(transform);
|
||||
|
||||
await UniTask.WhenAll(
|
||||
canvasGroupMotion.ToUniTask(cts),
|
||||
scale.ToUniTask(cts));
|
||||
}
|
||||
|
||||
public override async UniTask Close(CancellationToken cts = default)
|
||||
{
|
||||
var canvasGroupMotion = LMotion
|
||||
.Create(1f, 0, leadTime)
|
||||
.BindToAlpha(canvasGroup);
|
||||
|
||||
var scale = LMotion
|
||||
.Create(1f, starterScale, leadTime)
|
||||
.WithEase(Ease.InBounce)
|
||||
.BindToLocalScaleXYZ(transform);
|
||||
|
||||
await UniTask.WhenAll(
|
||||
canvasGroupMotion.ToUniTask(cts),
|
||||
scale.ToUniTask(cts));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 186e32a47b28436aa814d067cee27ad5
|
||||
timeCreated: 1794689064
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame.UI
|
||||
{
|
||||
public class MusicMinigamePlayerHealth : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject heartPrefab;
|
||||
|
||||
private List<GameObject> _hearts = new();
|
||||
|
||||
// sbe
|
||||
public void SetHealth(int count)
|
||||
{
|
||||
if (_hearts.Count < count)
|
||||
for (; count > 0; count--)
|
||||
_hearts.Add(Instantiate(heartPrefab, transform));
|
||||
else if (count >= 0)
|
||||
{
|
||||
for (var toDelete = _hearts.Count - count; toDelete > 0; toDelete--)
|
||||
{
|
||||
Destroy(_hearts[toDelete - 1]);
|
||||
_hearts.RemoveAt(toDelete - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void DecreaseHealth()
|
||||
{
|
||||
if (_hearts.Count <= 0) return;
|
||||
|
||||
Destroy(_hearts[0]);
|
||||
_hearts.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a7df6486b9b42529f373f1a54a58f52
|
||||
timeCreated: 1794690928
|
||||
@@ -90,7 +90,7 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
|
||||
BattleTimelinePanel battleTimelinePanel =
|
||||
(BattleTimelinePanel)await Context.UIFactory
|
||||
.LoadPanel(UIPanelType.BattleTimelinePanel, false);
|
||||
.LoadPanel(UIPanelType.BattleTimeline, false);
|
||||
|
||||
void InstallExtra(Scene scene, ContainerBuilder builder)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,8 @@ namespace Code.Infrastructure.Input
|
||||
Debug,
|
||||
OpenMovement,
|
||||
BattleMode,
|
||||
UI
|
||||
UI,
|
||||
MusicMinigame
|
||||
}
|
||||
|
||||
// Написать, чтобы розлин сама писала этот енам
|
||||
@@ -28,6 +29,18 @@ namespace Code.Infrastructure.Input
|
||||
// Написать, чтобы розлин сама писала этот енам
|
||||
public enum DebugActions
|
||||
{
|
||||
ToggleBattleMode
|
||||
ToggleBattleMode,
|
||||
ToggleMinigames
|
||||
}
|
||||
public enum MisucMinigameActions
|
||||
{
|
||||
AttackLeft,
|
||||
AttackUp,
|
||||
AttackDown,
|
||||
AttackRight,
|
||||
DefendLeft,
|
||||
DefendUp,
|
||||
DefendDown,
|
||||
DefendRight,
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ namespace Code.Infrastructure.App
|
||||
public enum AppStates
|
||||
{
|
||||
Testing,
|
||||
BattleState
|
||||
BattleState,
|
||||
MusicMinigame
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ namespace Code.Infrastructure.SceneLoader
|
||||
Testing,
|
||||
Battle,
|
||||
FirstTestingSegment,
|
||||
SecondTestingSegment
|
||||
SecondTestingSegment,
|
||||
MusicMinigame
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ namespace Code.Infrastructure.UI
|
||||
public enum UIPanelType
|
||||
{
|
||||
BattleActionDecision,
|
||||
BattleTimelinePanel
|
||||
BattleTimeline,
|
||||
MusicMinigame
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,16 @@
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "ToggleMinigames",
|
||||
"type": "Button",
|
||||
"id": "aecdbe52-7253-428c-a58a-a7633bb12690",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -28,6 +38,17 @@
|
||||
"action": "ToggleBattleMode",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "cfea34dd-ebdd-4e86-878d-369203e6c11e",
|
||||
"path": "<Keyboard>/m",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "ToggleMinigames",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -483,6 +504,182 @@
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MusicMinigame",
|
||||
"id": "ac322e26-8250-4c16-8132-ec91998586b9",
|
||||
"actions": [
|
||||
{
|
||||
"name": "AttackLeft",
|
||||
"type": "Button",
|
||||
"id": "3899e7e0-91c5-4e31-bfda-e24e99587a4b",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "AttackUp",
|
||||
"type": "Button",
|
||||
"id": "df4cd173-5e81-4018-988b-d1915d9fb390",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "AttackDown",
|
||||
"type": "Button",
|
||||
"id": "0b675f39-75dc-4a2a-aa66-a890a3ff2011",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "AttackRight",
|
||||
"type": "Button",
|
||||
"id": "38b9fb94-5a21-4c72-8b46-83a396a049a4",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "DefendLeft",
|
||||
"type": "Button",
|
||||
"id": "4b586448-1e97-4aca-a890-f8c065a964b1",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "DefendUp",
|
||||
"type": "Button",
|
||||
"id": "0e4372e8-4bc2-419f-a84e-f701b703312d",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "DefendDown",
|
||||
"type": "Button",
|
||||
"id": "ce4bfc24-96b7-4a1b-9c66-0b35e485b43a",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "DefendRight",
|
||||
"type": "Button",
|
||||
"id": "51714638-a0d0-4d86-9f59-b5f6b7252767",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "",
|
||||
"id": "b810efd9-bf6e-4bb3-852d-167094a70330",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "AttackLeft",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "63eaa8db-ec65-4cc0-b552-08d39c8531bd",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "AttackUp",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "3286ad79-dd0f-47f2-9f1b-9111e2356132",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "AttackDown",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "61c41ff1-ee9b-4d8b-823c-bb6873d157af",
|
||||
"path": "<Keyboard>/f",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "AttackRight",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "a1bf194c-2ab3-44dd-a363-b015c410d459",
|
||||
"path": "<Keyboard>/h",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "DefendLeft",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "64468659-d8ab-44df-bbcf-1c49bb7b98bc",
|
||||
"path": "<Keyboard>/j",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "DefendUp",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "99c0ed39-3c90-4a1b-96d2-ac2e1644f1a0",
|
||||
"path": "<Keyboard>/k",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "DefendDown",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "85d9a754-3969-4ffa-a627-755843a76e10",
|
||||
"path": "<Keyboard>/l",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "DefendRight",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": [
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebafedc18429ab5b98daa57f897fb238
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 676a5d75c7010ed308ca23dab8b5f660
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,77 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4397812927406164546
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6188351998833022953}
|
||||
- component: {fileID: 5473151042508338272}
|
||||
- component: {fileID: 7505432836953278835}
|
||||
m_Layer: 5
|
||||
m_Name: AttackBeat
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6188351998833022953
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 20}
|
||||
m_SizeDelta: {x: 75, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5473151042508338272
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7505432836953278835
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55a935e6af98ca412bb7eca2111394d7
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,77 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4397812927406164546
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6188351998833022953}
|
||||
- component: {fileID: 5473151042508338272}
|
||||
- component: {fileID: 7505432836953278835}
|
||||
m_Layer: 5
|
||||
m_Name: DefendBeat
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6188351998833022953
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 20}
|
||||
m_SizeDelta: {x: 75, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5473151042508338272
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7505432836953278835
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 318973310f844a25aad708bc0247c9ec
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 263960ff516f55c6686b3c63c7a6a28e, type: 3}
|
||||
m_Name: MusicMinigame
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.UI.UIPanelSettings
|
||||
Prefab:
|
||||
m_AssetGUID: e14ec93c8278d6421aaf4c2a64d9f43e
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
UIPanelType: 2
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8fdf9175e3640300eb7d227e42da1a22
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,183 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 1
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 2
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &1143616099
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1143616101}
|
||||
- component: {fileID: 1143616100}
|
||||
- component: {fileID: 1143616102}
|
||||
m_Layer: 0
|
||||
m_Name: SceneScope
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1143616100
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143616099}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5312032623c34414a54ea00e35a7eb8e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Reflex::Reflex.Core.ContainerScope
|
||||
--- !u!4 &1143616101
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143616099}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1143616102
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1143616099}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: edefcd12d6e34b4095a4ce2db069073d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Game.Minigames.MusicGame.MusicMinigameSceneInstaller
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1143616101}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d0107d04a35bdb05aac91fbe0250015
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ac1e8cb247f54fceb18065f749bb513c, type: 3}
|
||||
m_Name: MusicMinigameConfig
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Game.Minigames.MusicGame.MusicMinigameConfig
|
||||
beatPrefabs:
|
||||
- key: 0
|
||||
value: {fileID: 6188351998833022953, guid: 55a935e6af98ca412bb7eca2111394d7, type: 3}
|
||||
- key: 1
|
||||
value: {fileID: 6188351998833022953, guid: 318973310f844a25aad708bc0247c9ec, type: 3}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6ef95cfab02dac4dbee750cca673f4c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e14ec93c8278d6421aaf4c2a64d9f43e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f8b44b2bf5414b47a94fc1633e021e94, type: 3}
|
||||
m_Name: MusicMinigameScene
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.SceneLoader.SceneInfo
|
||||
SceneAsset:
|
||||
m_AssetGUID: 8d0107d04a35bdb05aac91fbe0250015
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
SceneId: 4
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd086dd02f7f70a31b2632a1d01e91af
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,77 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4397812927406164546
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6188351998833022953}
|
||||
- component: {fileID: 5473151042508338272}
|
||||
- component: {fileID: 7505432836953278835}
|
||||
m_Layer: 5
|
||||
m_Name: PlayerHeart
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6188351998833022953
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.67, y: 0.67, z: 0.67}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5473151042508338272
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7505432836953278835
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4397812927406164546}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a6950fef8a618cada0a066e3cce8eaf
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14525694376ef4959bd431db5428a773
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95c1ff0cdd7c62f0f929a0eba4731910
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fef4b9313ec590069e35eae72f66426
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bb7b46e42e7d43e5a883d60a072d5fe1, type: 3}
|
||||
m_Name: OverworldTest
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Game.Minigames.MusicGame.MusicMinigameTrackConfig
|
||||
Type: 0
|
||||
Clip: {fileID: 8300000, guid: 5fef4b9313ec590069e35eae72f66426, type: 3}
|
||||
hitWindowSamples: 10000
|
||||
leadTimeSamples: 100000
|
||||
midiFile: {fileID: 4900000, guid: 95c1ff0cdd7c62f0f929a0eba4731910, type: 3}
|
||||
bpm: 140
|
||||
maxEnemyHealth: 50
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e08b9e928480db8a95dad08b4d9889d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -29,6 +29,13 @@ MonoBehaviour:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
ParticleInfo: Particles
|
||||
MusicMinigameTrackConfig: MusicMinigameTrack
|
||||
MusicMinigameConfig:
|
||||
m_AssetGUID: d6ef95cfab02dac4dbee750cca673f4c
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
InputServiceConfig:
|
||||
m_AssetGUID: e92086276d9b32213abd64903ad4b730
|
||||
m_SubObjectName:
|
||||
|
||||
Reference in new issue
Block a user