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