Commit 2ee7fa85 authored by 18신대성's avatar 18신대성 Committed by 15박보승

섬광탄 효과 적용

parent 1c58d0e5
......@@ -26,7 +26,7 @@ RenderSettings:
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 2100000, guid: 7e1e5781d39549148abcbf66c428df00, type: 2}
m_SkyboxMaterial: {fileID: 2100000, guid: 21bb8ae9866c4304198832331df496dc, type: 3}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 170076734}
m_IndirectSpecularColor: {r: 0.040745974, g: 0.050543424, b: 0.08338426, a: 1}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......@@ -224,7 +224,8 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children: []
m_Children:
- {fileID: 1839944656}
m_Father: {fileID: 0}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -530,6 +531,80 @@ MonoBehaviour:
m_BeforeTransparentBundles: []
m_BeforeStackBundles: []
m_AfterStackBundles: []
--- !u!1 &1839944655
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1839944656}
- component: {fileID: 1839944658}
- component: {fileID: 1839944657}
m_Layer: 5
m_Name: Whiteout
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1839944656
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839944655}
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_Children: []
m_Father: {fileID: 158856772}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1920, y: 1080}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1839944657
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839944655}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
--- !u!222 &1839944658
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839944655}
m_CullTransparentMesh: 0
--- !u!114 &1994486390 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2122327709, guid: 42247a938bb6e554eb00dc08303a72d6,
......@@ -637,6 +712,14 @@ PrefabInstance:
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2122327709, guid: 42247a938bb6e554eb00dc08303a72d6, type: 3}
propertyPath: uiGenerator
value:
objectReference: {fileID: 158856768}
- target: {fileID: 2122327709, guid: 42247a938bb6e554eb00dc08303a72d6, type: 3}
propertyPath: whiteout
value:
objectReference: {fileID: 1839944657}
- target: {fileID: 52444459818764335, guid: 42247a938bb6e554eb00dc08303a72d6,
type: 3}
propertyPath: m_LocalPosition.x
......@@ -692,10 +775,6 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2122327709, guid: 42247a938bb6e554eb00dc08303a72d6, type: 3}
propertyPath: uiGenerator
value:
objectReference: {fileID: 158856768}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 42247a938bb6e554eb00dc08303a72d6, type: 3}
--- !u!1001 &1444571407246859822
......@@ -769,6 +848,16 @@ PrefabInstance:
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1994486390}
- target: {fileID: 1444571407667829092, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_RenderMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571407667829092, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f, type: 3}
--- !u!1001 &5089720519379341084
......
......@@ -2,10 +2,15 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class GameManager : SingletonBehaviour<GameManager>
{
[Space(10)]
public ClearUIGenerator uiGenerator;
public Image whiteout;
[Space(10)]
public bool isGameOver = false;
public int[] clearIndex = new int[9];
......@@ -46,12 +51,40 @@ public class GameManager : SingletonBehaviour<GameManager>
public void StartStage()
{
MapManager.inst.LoadMap(currentStage);
StartCoroutine(Whiteout(false));
}
IEnumerator Whiteout(bool goToWhite)
{
float setTime = 0.2f;
float resetTime = 1.5f;
if (goToWhite)
{
for (float i = 0; i < setTime; i += Time.deltaTime)
{
whiteout.color = new Color(1, 1, 1, Mathf.Sin((i / setTime) * (Mathf.PI / 2)));
yield return null;
}
whiteout.color = new Color(1, 1, 1, 1);
}
else
{
for (float i = resetTime; i > 0; i -= Time.deltaTime)
{
whiteout.color = new Color(1, 1, 1, i / resetTime);
yield return null;
}
whiteout.color = new Color(1, 1, 1, 0);
}
}
public IEnumerator ClearStage()
{
GameObject.Find("TestTools").GetComponent<TestTools>().clear.gameObject.SetActive(true);
Debug.Log("Stage Clear!");
Cursor.visible = true;
Cursor.lockState = CursorLockMode.None;
yield return new WaitForSeconds(3);
BackToStageSelect();
}
......@@ -64,8 +97,8 @@ public class GameManager : SingletonBehaviour<GameManager>
public IEnumerator RestartStage()
{
Debug.Log("Game Restart!");
StartCoroutine(Whiteout(true));
yield return new WaitForSeconds(0.5f);
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment