SE追加
This commit is contained in:
parent
12e2bfa740
commit
2c57fbe44d
|
|
@ -14520,6 +14520,11 @@ MonoBehaviour:
|
|||
interval: 0
|
||||
filename: se_cooking_corn_FlyAway
|
||||
maxCount: 0
|
||||
- delay: 0.6
|
||||
time: 0
|
||||
interval: 0
|
||||
filename: se_cooking_corn_Collide
|
||||
maxCount: 0
|
||||
--- !u!1 &7516975307813098669
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -16,16 +16,19 @@ public class PopcornGameView : MonoBehaviour
|
|||
switch (state)
|
||||
{
|
||||
case GameState.Guide:
|
||||
SoundManager.Instance.StopSELoop("se_cooking_corn_bake");
|
||||
ChangeGuideState(true);
|
||||
ChangeFireState(false);
|
||||
ChangeStreamState(false);
|
||||
ChangeCharacterState(ThermalCondition.Cold);
|
||||
break;
|
||||
case GameState.Playing:
|
||||
SoundManager.Instance.PlaySELoop("se_cooking_corn_bake");
|
||||
ChangeGuideState(false);
|
||||
ChangeFireState(true);
|
||||
break;
|
||||
case GameState.Result:
|
||||
SoundManager.Instance.StopSELoop("se_cooking_corn_bake");
|
||||
ChangeFireState(false);
|
||||
ChangeStreamState(true);
|
||||
ChangeCharacterState(ThermalCondition.Cold);
|
||||
|
|
@ -42,6 +45,10 @@ public class PopcornGameView : MonoBehaviour
|
|||
|
||||
private void ChangeFireState(bool isActive)
|
||||
{
|
||||
if (isActive)
|
||||
{
|
||||
SoundManager.Instance.PlaySE("se_cooking_switch");
|
||||
}
|
||||
fire.SetActive(isActive);
|
||||
oilEffect.SetActive(isActive);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UniRx;
|
||||
using UniRx.Triggers;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
|
@ -66,6 +67,8 @@ public class KitchenManager : MonoBehaviour
|
|||
orderIndicatorView.SetIndicate(result.result, achieved || cancelled);
|
||||
if (result.result)
|
||||
{
|
||||
SoundManager.Instance.StopSE("se_Main_phone_sound");
|
||||
|
||||
var messageList = SpreadsheetDataManager.Instance.GetBaseDataList<BulkOrderTextData>(Const.BulkOrderTextDataSheet);
|
||||
var nextMessageList = messageList.Where(data => data.shopLevel == result.nextOrderLevel).ToList();
|
||||
orderIndicatorView.TappedPhone.ThrottleFirst(TimeSpan.FromSeconds(1f)).Take(1).Subscribe(_ =>
|
||||
|
|
@ -161,4 +164,12 @@ public class KitchenManager : MonoBehaviour
|
|||
// 条件チェック
|
||||
return (condition <= gameData.OrderConditionCount, nextOrderId, nextOrderLevel);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (SoundManager.ExistsInstance)
|
||||
{
|
||||
SoundManager.Instance.StopSE("se_Main_phone_sound");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ public class BrotherConversation : MonoBehaviour
|
|||
.Select(x => targetScriptList[x])
|
||||
.Subscribe(data =>
|
||||
{
|
||||
SoundManager.Instance.PlaySE("se_ButtonTap");
|
||||
SetData(data);
|
||||
}, () =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -283,6 +283,12 @@ public class SoundManager : SingletonMonoBehaviour<SoundManager> {
|
|||
bgmSource.Stop();
|
||||
bgmSource.clip = null;
|
||||
}
|
||||
public void StopSE(string filePath){
|
||||
var index = seSourceList.FindIndex(playing => playing.Name == filePath);
|
||||
if (index == -1) return;
|
||||
seSourceList[index].StopDestroy();
|
||||
seSourceList.RemoveAt(index);
|
||||
}
|
||||
public void StopSE(){
|
||||
foreach(PlayingAudio playing in seSourceList){
|
||||
playing.Stop();
|
||||
|
|
|
|||
Loading…
Reference in New Issue