From 09abcff7aa5a42ad102f909abb84e56921836eaf Mon Sep 17 00:00:00 2001 From: kimura Date: Mon, 26 Jul 2021 11:55:46 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=91=E3=83=BC=E3=83=86=E3=82=A3=E3=82=AF?= =?UTF-8?q?=E3=83=AB=E3=82=B9=E3=82=AD=E3=83=B3=E5=A4=89=E6=9B=B4=E5=87=A6?= =?UTF-8?q?=E7=90=86=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EffectPrefabs/pt_Popcorn_strike.prefab | 19 +++++ ...opcorn_unfinished_burnt_failure_Dither.mat | 77 +++++++++++++++++++ ...n_unfinished_burnt_failure_Dither.mat.meta | 8 ++ .../MyGame/Scenes/Cooking/Cooking.unity | 2 +- .../Scenes/Cooking/Scripts/CornManager.cs | 2 +- .../Cooking/Scripts/PopcornStrikeEffect.cs | 22 ++++++ .../Scripts/PopcornStrikeEffect.cs.meta | 3 + 7 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 popcorn/Assets/MyGame/Resource/Material/popcorn/popcorn_unfinished_burnt_failure_Dither.mat create mode 100644 popcorn/Assets/MyGame/Resource/Material/popcorn/popcorn_unfinished_burnt_failure_Dither.mat.meta create mode 100644 popcorn/Assets/MyGame/Scenes/Cooking/Scripts/PopcornStrikeEffect.cs create mode 100644 popcorn/Assets/MyGame/Scenes/Cooking/Scripts/PopcornStrikeEffect.cs.meta diff --git a/popcorn/Assets/MyGame/Resource/Effect/EffectPrefabs/pt_Popcorn_strike.prefab b/popcorn/Assets/MyGame/Resource/Effect/EffectPrefabs/pt_Popcorn_strike.prefab index 1fd912fd..2f91c247 100644 --- a/popcorn/Assets/MyGame/Resource/Effect/EffectPrefabs/pt_Popcorn_strike.prefab +++ b/popcorn/Assets/MyGame/Resource/Effect/EffectPrefabs/pt_Popcorn_strike.prefab @@ -9680,6 +9680,7 @@ GameObject: - component: {fileID: 7516975307168929495} - component: {fileID: 7516975307168929494} - component: {fileID: 7516975307168929493} + - component: {fileID: 721213865261247925} m_Layer: 0 m_Name: pt_Popcorn_strike m_TagString: Untagged @@ -14482,6 +14483,24 @@ ParticleSystemRenderer: m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} m_MaskInteraction: 0 +--- !u!114 &721213865261247925 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7516975307168929492} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0125090276d945c2bb856fd440fdff6b, type: 3} + m_Name: + m_EditorClassIdentifier: + particleRenderA: {fileID: 7516975307813098671} + particleRenderB: {fileID: 7516975307116267766} + particleRenderC: {fileID: 7516975306867202139} + burntMaterialA: {fileID: 2100000, guid: bec51957e6eb5467abd3d46dc72f642a, type: 2} + burntMaterialB: {fileID: 2100000, guid: cea7e196dbc8d4a4a8b8540ce7a2410f, type: 2} + burntMaterialC: {fileID: 2100000, guid: 036c01b6cfb3f425e9b48f183b100571, type: 2} --- !u!1 &7516975307813098669 GameObject: m_ObjectHideFlags: 0 diff --git a/popcorn/Assets/MyGame/Resource/Material/popcorn/popcorn_unfinished_burnt_failure_Dither.mat b/popcorn/Assets/MyGame/Resource/Material/popcorn/popcorn_unfinished_burnt_failure_Dither.mat new file mode 100644 index 00000000..b6273b78 --- /dev/null +++ b/popcorn/Assets/MyGame/Resource/Material/popcorn/popcorn_unfinished_burnt_failure_Dither.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: popcorn_unfinished_burnt_failure_Dither + m_Shader: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 8d287beb744ac6b458a3088ac499a1dd, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/popcorn/Assets/MyGame/Resource/Material/popcorn/popcorn_unfinished_burnt_failure_Dither.mat.meta b/popcorn/Assets/MyGame/Resource/Material/popcorn/popcorn_unfinished_burnt_failure_Dither.mat.meta new file mode 100644 index 00000000..b622c350 --- /dev/null +++ b/popcorn/Assets/MyGame/Resource/Material/popcorn/popcorn_unfinished_burnt_failure_Dither.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cea7e196dbc8d4a4a8b8540ce7a2410f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity index 9e771bbf..9d24a6cf 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity @@ -8912,7 +8912,7 @@ MonoBehaviour: cornSpawnTarget: {fileID: 1440136003} cornPrefab: {fileID: 5499754490129207122, guid: 2b790fd908bd14de4a601c21374fb55b, type: 3} - spilledCornAnimationPrefab: {fileID: 2449901118440757730, guid: 7e7fbf241bd7f461fb46363ff0c6be3e, + spilledCornAnimationPrefab: {fileID: 7516975307168929492, guid: 33c91c454a38e410cb291f1f2e5756cc, type: 3} cornSpawnCount: 50 maxFailedCornCount: 25 diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs index dd7fe019..3e9a2bd0 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs @@ -253,7 +253,7 @@ public class CornManager : MonoBehaviour // 画面KO再生 var animation = Instantiate(spilledCornAnimationPrefab, position, Quaternion.identity); // KOコーンスキン変更 - animation.GetComponent().ChangeCornSkin(condition); + animation.GetComponent().ChangeSkin(condition); VibrationManager.Instance.PlayVibrationDoubleStrong(); this.CallWaitForSeconds(1.5f, () => Destroy(animation)); } diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/PopcornStrikeEffect.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/PopcornStrikeEffect.cs new file mode 100644 index 00000000..97eb70d7 --- /dev/null +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/PopcornStrikeEffect.cs @@ -0,0 +1,22 @@ +using System; +using UnityEngine; + +public class PopcornStrikeEffect : MonoBehaviour +{ + [SerializeField] private ParticleSystemRenderer particleRenderA; + [SerializeField] private ParticleSystemRenderer particleRenderB; + [SerializeField] private ParticleSystemRenderer particleRenderC; + [SerializeField] private Material burntMaterialA; + [SerializeField] private Material burntMaterialB; + [SerializeField] private Material burntMaterialC; + + public void ChangeSkin(CornCondition condition) + { + if (condition == CornCondition.Burnt) + { + particleRenderA.material = burntMaterialA; + particleRenderB.material = burntMaterialB; + particleRenderC.material = burntMaterialC; + } + } +} diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/PopcornStrikeEffect.cs.meta b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/PopcornStrikeEffect.cs.meta new file mode 100644 index 00000000..dd4f1f27 --- /dev/null +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/PopcornStrikeEffect.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0125090276d945c2bb856fd440fdff6b +timeCreated: 1627263716 \ No newline at end of file