diff --git a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity index 12f523c..a4efb7a 100644 --- a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity +++ b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity @@ -112,190 +112,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &171055054 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 171055058} - - component: {fileID: 171055057} - - component: {fileID: 171055056} - - component: {fileID: 171055055} - m_Layer: 0 - m_Name: Wall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!64 &171055055 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 171055054} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 14 - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &171055056 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 171055054} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &171055057 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 171055054} - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &171055058 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 171055054} - m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 6, z: 0} - m_LocalScale: {x: 2.585, y: 1, z: 1.2} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!1 &299496350 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 299496354} - - component: {fileID: 299496353} - - component: {fileID: 299496352} - - component: {fileID: 299496351} - m_Layer: 0 - m_Name: Ground - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!64 &299496351 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 299496350} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 14 - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &299496352 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 299496350} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &299496353 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 299496350} - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &299496354 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 299496350} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -6} - m_LocalScale: {x: 2.585, y: 1, z: 1.2} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &503604495 GameObject: m_ObjectHideFlags: 0 @@ -308,12 +124,12 @@ GameObject: - component: {fileID: 503604498} - component: {fileID: 503604497} m_Layer: 5 - m_Name: Wall_RawImage + m_Name: BGImage m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &503604496 RectTransform: m_ObjectHideFlags: 0 @@ -330,8 +146,8 @@ RectTransform: 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: 600} - m_SizeDelta: {x: 2527, y: 1200} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 2528, y: 2400} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &503604497 MonoBehaviour: @@ -407,7 +223,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4472652550524646, guid: 1f68bf7cec2600e49a46d2f0554453c8, type: 3} propertyPath: m_RootOrder - value: 8 + value: 4 objectReference: {fileID: 0} - target: {fileID: 4472652550524646, guid: 1f68bf7cec2600e49a46d2f0554453c8, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -459,7 +275,7 @@ PrefabInstance: - target: {fileID: 114872970294644716, guid: 1f68bf7cec2600e49a46d2f0554453c8, type: 3} propertyPath: customRoi.width - value: 2527 + value: 2528 objectReference: {fileID: 0} - target: {fileID: 114872970294644716, guid: 1f68bf7cec2600e49a46d2f0554453c8, type: 3} @@ -486,7 +302,7 @@ GameObject: - component: {fileID: 540220394} - component: {fileID: 540220393} m_Layer: 0 - m_Name: WallPlayer + m_Name: BGPlayer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -520,7 +336,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 10f07b3f9fb96524db93eb42d89c229c, type: 3} m_Name: m_EditorClassIdentifier: - VideoAsset: {fileID: 11400000, guid: 232980c200b699741a54e99e165d86a2, type: 2} + VideoAsset: {fileID: 11400000, guid: 6229d9bc54545b7448f9d14d62d66a5f, type: 2} LoadOnAwake: 1 PlayOnStart: 1 Looping: 1 @@ -545,7 +361,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -619,78 +435,8 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &797223803 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 797223804} - - component: {fileID: 797223806} - - component: {fileID: 797223805} - m_Layer: 5 - m_Name: Ground_RawImage - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &797223804 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 797223803} - 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: 798465533} m_RootOrder: 1 - 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: -600} - m_SizeDelta: {x: 2527, y: 1200} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &797223805 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 797223803} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -98529514, 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_Texture: {fileID: 0} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &797223806 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 797223803} - m_CullTransparentMesh: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &798465529 GameObject: m_ObjectHideFlags: 0 @@ -782,10 +528,9 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - {fileID: 503604496} - - {fileID: 797223804} - {fileID: 1959362813} m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -821,7 +566,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 0 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &914806966 MonoBehaviour: @@ -835,8 +580,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e7eda42473bde25468ccb55d2b565cf9, type: 3} m_Name: m_EditorClassIdentifier: - img: {fileID: 2142686115215515793, guid: 8bbc036a3be21954681613cbe4f0e9a8, type: 3} + img: {fileID: 2829506254029656376, guid: 8bbc036a3be21954681613cbe4f0e9a8, type: 3} canvas: {fileID: 798465533} + frame_gap: 20 + delta_threshold: 100 + img_fade_speed: 0.02 + img_wait_sec: 2 --- !u!1 &963194225 GameObject: m_ObjectHideFlags: 0 @@ -918,7 +667,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &963194229 MonoBehaviour: @@ -933,85 +682,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _clearAlpha: 1 ---- !u!1 &1395462205 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1395462209} - - component: {fileID: 1395462208} - - component: {fileID: 1395462207} - - component: {fileID: 1395462206} - m_Layer: 0 - m_Name: GroundPlayer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1395462206 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1395462205} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 03dae28dfe6734f4eb76c922ac72dd34, type: 3} - m_Name: - m_EditorClassIdentifier: - target: 0 - materials: [] - attributeName: - targetObject: {fileID: 797223803} ---- !u!114 &1395462207 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1395462205} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 10f07b3f9fb96524db93eb42d89c229c, type: 3} - m_Name: - m_EditorClassIdentifier: - VideoAsset: {fileID: 11400000, guid: 232980c200b699741a54e99e165d86a2, type: 2} - LoadOnAwake: 1 - PlayOnStart: 1 - Looping: 1 - AudioVolume: 1 ---- !u!222 &1395462208 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1395462205} - m_CullTransparentMesh: 0 ---- !u!224 &1395462209 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1395462205} - 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: 0} - m_RootOrder: 6 - 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: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1959362812 GameObject: m_ObjectHideFlags: 0 @@ -1043,7 +713,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 798465533} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} diff --git a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/movieController.cs b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/movieController.cs index 21cbba0..66619e8 100644 --- a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/movieController.cs +++ b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/movieController.cs @@ -9,18 +9,18 @@ public class movieController : MonoBehaviour { DShowMoviePlayer player; public int id; - public float fade_speed = 0.02f; public int stat; - public float alpha; + public float fade_speed; + public bool force_destroy; public float destroy_timer; - public bool CanDsetroy; - float wait_sec = 2f; + public float wait_sec = 2f; + float alpha; void Awake() { player = GetComponent(); - CanDsetroy = true; stat = 1; + force_destroy = false; } void Start() @@ -45,6 +45,10 @@ public class movieController : MonoBehaviour } } + else if (stat == 2 && force_destroy) + { + stat = 3; + } else if (stat == 3) { float t = Time.time; @@ -52,7 +56,7 @@ public class movieController : MonoBehaviour { //Debug.Log("fade"); alpha -= fade_speed; - if (alpha < 0 && CanDsetroy) + if (alpha < 0) { Destroy(this.gameObject); } diff --git a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/tuio_event.cs b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/tuio_event.cs index 326208d..42b7da0 100644 --- a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/tuio_event.cs +++ b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/tuio_event.cs @@ -1,16 +1,31 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UltraCombos.Configuration; public class tuio_event : MonoBehaviour { -#if true - public GameObject img; + public movieController img; public Transform canvas; - //public UltraCombos.GlobalMKHookInput tuio_input; Dictionary movies = new Dictionary(); Dictionary pre_pos = new Dictionary(); + [Config] + [Range(1, 30)] + public int frame_gap = 20; + + [Config] + [Range(50, 300)] + public int delta_threshold = 100; + + [Config] + [Range(0.01f, 0.1f)] + public float img_fade_speed = 0.02f; + + [Config] + [Range(0.01f, 5f)] + public float img_wait_sec = 2f; + void Update() { var touches = TUIOManager.Instance.touches; @@ -19,49 +34,33 @@ public class tuio_event : MonoBehaviour movieController movie = null; if (movies.ContainsKey(id) == false) // Add { - Debug.Log("Add"); - GameObject g = Instantiate(img, canvas); + //Debug.Log("Add"); + GameObject g = Instantiate(img.gameObject, canvas); g.name = id.ToString(); movie = g.AddComponent(); + movie.fade_speed = img_fade_speed; + movie.wait_sec = img_wait_sec; movie.id = id; movies.Add(id, movie); movie.transform.position = touches[id].position; - pre_pos.Add(id, touches[id].position); + pre_pos[id] = touches[id].position; } else //update { - if (Time.frameCount % 10 == 0) + movie = movies[id]; + if (Time.frameCount % frame_gap == 0) { - float delta_pos = Vector2.Distance(pre_pos[id], touches[id].position); - if (delta_pos > 200) + float delta_pos = Vector2.Distance(pre_pos[id], movie.transform.position); + //float delta_pos = 199; + //Debug.Log("delta pos = " + delta_pos); + if (delta_pos > delta_threshold) { - Debug.Log("generate new one"); - GameObject g = Instantiate(img, canvas); - int clone_id = id + Random.Range(5000, 10000); - g.name = clone_id.ToString(); - movie = g.AddComponent(); - movie.id = clone_id; - movies.Add(clone_id, movie); - movie.transform.position = pre_pos[id]; - movie.transform.localRotation = movies[id].transform.localRotation; - movie.alpha = 0.9f; - - movies[id].stat = 0; - movies[id].transform.position = touches[id].position; - movies[id].CanDsetroy = false; - movies[id].rotateImg(); - - pre_pos[id] = touches[id].position; - } - else - { - //movies[id].transform.position = touches[id].position; + movie.force_destroy = true; + movie.destroy_timer = Time.time; + movies.Remove(id); } + pre_pos[id] = touches[id].position; } - else - { - movie = movies[id]; - } } //update or after adding //Debug.Log("Update"); @@ -83,12 +82,10 @@ public class tuio_event : MonoBehaviour { movies[id].stat = 3; movies[id].destroy_timer = Time.time; - movies[id].CanDsetroy = true; movies.Remove(id); - Debug.Log("Remove"); + //Debug.Log("Remove"); } //movies[id].destroy_timer = Time.time; } } -#endif } diff --git a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/BG.DShowClip.asset b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/BG.DShowClip.asset new file mode 100644 index 0000000..40225cb --- /dev/null +++ b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/BG.DShowClip.asset @@ -0,0 +1,17 @@ +%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: b7eca376a120a0e49a97afa024778843, type: 3} + m_Name: BG.DShowClip + m_EditorClassIdentifier: + m_VideoLocation: 1 + m_VideoPath: ..\..\..\..\_Deploy_PC\08_DarkSea\Material\Frozen2_DarkSea_test_hap.avi + animationClip: {fileID: 0} diff --git a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/BG.DShowClip.asset.meta b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/BG.DShowClip.asset.meta new file mode 100644 index 0000000..f84cac4 --- /dev/null +++ b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/BG.DShowClip.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6229d9bc54545b7448f9d14d62d66a5f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Packages/manifest.json b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Packages/manifest.json index 2590a96..6ea371b 100644 --- a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Packages/manifest.json +++ b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Packages/manifest.json @@ -3,6 +3,8 @@ "com.ultracombos.movie-player": "file:/../../../../../_Package/com.ultracombos.movie-player", "com.ultracombos.tuio": "file:/../../../../../_Package/com.ultracombos.tuio", "com.ultracombos.osc": "file:/../../../../../_Package/com.ultracombos.osc", + "com.ultracombos.grpc": "file:/../../../../../_Package/com.ultracombos.grpc", + "com.ultracombos.configuration": "file:/../../../../../_Package/com.ultracombos.configuration", "jp.keijiro.klak.spout": "file:/../../../../../_Package/KlakSpout", "com.unity.ads": "2.0.8", "com.unity.analytics": "3.2.2", diff --git a/Unity-19050-01_ForstCoronation/Assets/Scenes/Ice.unity b/Unity-19050-01_ForstCoronation/Assets/Scenes/Ice.unity index 42f9260..c395d5e 100644 --- a/Unity-19050-01_ForstCoronation/Assets/Scenes/Ice.unity +++ b/Unity-19050-01_ForstCoronation/Assets/Scenes/Ice.unity @@ -371,7 +371,7 @@ RectTransform: - {fileID: 1269857429} - {fileID: 1048552606} m_Father: {fileID: 0} - m_RootOrder: 12 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -464,7 +464,6 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 590248849} - - component: {fileID: 590248855} - component: {fileID: 590248848} - component: {fileID: 590248847} - component: {fileID: 590248850} @@ -472,6 +471,7 @@ GameObject: - component: {fileID: 590248852} - component: {fileID: 590248853} - component: {fileID: 590248854} + - component: {fileID: 590248855} m_Layer: 8 m_Name: 01FrostCamera m_TagString: MainCamera @@ -556,7 +556,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Version: 1 - clearColorMode: 0 + clearColorMode: 1 backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} clearDepth: 1 renderingPath: 0 @@ -635,7 +635,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} - m_PlayOnAwake: 1 + m_PlayOnAwake: 0 m_Volume: 1 m_Pitch: 1 Loop: 0 @@ -806,37 +806,12 @@ MonoBehaviour: m_GameObject: {fileID: 590248846} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e8a636f62116c0a40bbfefdf876d4608, type: 3} + m_Script: {fileID: 11500000, guid: e3690c34aff288d4d9b9a4d84bc7504a, type: 3} m_Name: m_EditorClassIdentifier: - boost: 3.5 - positionLerpTime: 0.2 - mouseSensitivityCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0.5 - inSlope: 0 - outSlope: 5 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 2.5 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - rotationLerpTime: 0.01 - invertY: 0 + cam_x: 0 + cam_y: 8 + key_movement: 0.1 --- !u!1 &706372899 GameObject: m_ObjectHideFlags: 0 @@ -1077,7 +1052,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 10 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!1 &1048552605 GameObject: @@ -1292,7 +1267,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 11 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1090188929 MonoBehaviour: @@ -1353,8 +1328,8 @@ MonoBehaviour: m_EditorClassIdentifier: m_ExecuteInEditor: 1 m_Bindings: - - {fileID: 1090188929} - {fileID: 1090188930} + - {fileID: 1090188929} - {fileID: 1090188931} m_VisualEffect: {fileID: 1090188927} --- !u!1 &1216109995 @@ -1809,10 +1784,9 @@ MonoBehaviour: stat: Emitter_x: 3.5 Target_x: -3 - Common_z: 0 - growingSpeed: 0.008 - fadeSpeed: 15 - smooth: 0.3 + growing_speed: 0.008 + delay_sec: 2 + lifetime: 5 --- !u!4 &1482770261 Transform: m_ObjectHideFlags: 0 @@ -1825,7 +1799,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1674836082 GameObject: @@ -1855,7 +1829,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 9 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1840994726 PrefabInstance: @@ -1898,7 +1872,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4601478661674938, guid: 6143453941a05b54582f835773a10d58, type: 3} propertyPath: m_RootOrder - value: 8 + value: 7 objectReference: {fileID: 0} - target: {fileID: 4601478661674938, guid: 6143453941a05b54582f835773a10d58, type: 3} propertyPath: m_LocalEulerAnglesHint.x diff --git a/Unity-19050-01_ForstCoronation/Assets/Scripts/CameraController.cs b/Unity-19050-01_ForstCoronation/Assets/Scripts/CameraController.cs new file mode 100644 index 0000000..c4ab3e1 --- /dev/null +++ b/Unity-19050-01_ForstCoronation/Assets/Scripts/CameraController.cs @@ -0,0 +1,42 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UltraCombos.Configuration; + +public class CameraController : MonoBehaviour + +{ + [Config] + [Range(-5f, 5f)] + public float cam_x; + + [Config] + [Range(5f, 10f)] + public float cam_y = 8f; + + [Config] + [Range(0.05f, 0.5f)] + public float key_movement = 0.1f; + + // Update is called once per frame + void Update() + { + if (Input.GetKeyDown(KeyCode.A)) + { + cam_x -= key_movement; + } + else if (Input.GetKeyDown(KeyCode.D)) + { + cam_x += key_movement; + } + else if (Input.GetKeyDown(KeyCode.W)) + { + cam_y += key_movement; + } + else if (Input.GetKeyDown(KeyCode.S)) + { + cam_y -= key_movement; + } + GetComponent().position = new Vector3(cam_x, cam_y, 0); + } +} diff --git a/Unity-19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs b/Unity-19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs index 0728617..0938671 100644 --- a/Unity-19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs +++ b/Unity-19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs @@ -25,21 +25,17 @@ public class DebugUI : MonoBehaviour [Range(-5f, 0f)] public float Target_x = -2.5f; - [Config] - [Range(-3f, 3f)] - public float Common_z = 0f; - [Config] [Range(0f, 0.05f)] - public float growingSpeed; + public float growing_speed = 0.008f; [Config] - [Range(10, 30)] - public float fadeSpeed; + [Range(0, 5)] + public int delay_sec = 2; [Config] - [Range(0f, 0.5f)] - public float smooth; + [Range(1, 10)] + public int lifetime = 5; float lerp_val; Vector3 final_pos; @@ -97,25 +93,25 @@ public class DebugUI : MonoBehaviour if(stat == "growing") { - lerp_val += growingSpeed; + lerp_val += growing_speed; if(lerp_val >= 1) { lerp_val = 1; stat = "completed"; StartCoroutine("sendCompleted"); - Invoke("setButtonInteractable", 1); + Invoke("setButtonInteractable", delay_sec); button.GetComponent().text = stat; Debug.Log(stat); } } else if(stat == "vanishing") { - lerp_val -= growingSpeed; + lerp_val -= growing_speed; if(lerp_val <= 0) { lerp_val = 0; stat = "wait"; - Invoke("setButtonInteractable", 1); + Invoke("setButtonInteractable", delay_sec); button.GetComponent().text = stat; Debug.Log(stat); } @@ -126,8 +122,8 @@ public class DebugUI : MonoBehaviour Transform base_trans = baseEmitter.GetComponent(); Transform targ_trans = target.GetComponent(); - base_trans.position = new Vector3(Emitter_x, 0, Common_z); - targ_trans.position = new Vector3(Target_x, 0, Common_z); + baseEmitter.transform.position = new Vector3(Emitter_x, 0, 0); + targ_trans.position = new Vector3(Target_x, 0, 0); emitter.GetComponent().position = Vector3.Lerp(base_trans.position, targ_trans.position, lerp_val); } @@ -185,6 +181,6 @@ public class DebugUI : MonoBehaviour void updateVFX() { - + vfx.SetInt("lifetime", lifetime); } } diff --git a/Unity-19050-01_ForstCoronation/Assets/Visual Effect Graphs/iceVFX_2018.vfx b/Unity-19050-01_ForstCoronation/Assets/Visual Effect Graphs/iceVFX_2018.vfx index 1590bb6..b519ce1 100644 --- a/Unity-19050-01_ForstCoronation/Assets/Visual Effect Graphs/iceVFX_2018.vfx +++ b/Unity-19050-01_ForstCoronation/Assets/Visual Effect Graphs/iceVFX_2018.vfx @@ -249,7 +249,7 @@ MonoBehaviour: x: -2023 y: -365 width: 4673 - height: 3718 + height: 3719 --- !u!114 &114350483966674976 MonoBehaviour: m_ObjectHideFlags: 1 @@ -419,7 +419,7 @@ MonoBehaviour: m_Type: m_SerializableType: System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - m_SerializableObject: 7 + m_SerializableObject: 5 min: 1 max: 10 descendantCount: 0 @@ -4240,7 +4240,7 @@ VisualEffectResource: - m_ExpressionIndex: 104 m_Value: 5 - m_ExpressionIndex: 219 - m_Value: 7 + m_Value: 5 m_Matrix4x4f: m_Array: [] m_AnimationCurve: @@ -4337,7 +4337,7 @@ VisualEffectResource: outWeight: 0 - serializedVersion: 3 time: 1 - value: 0.6636117 + value: 0.7751687 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -4519,7 +4519,7 @@ VisualEffectResource: - m_ExpressionIndex: 284 m_Value: {fileID: 11700000, guid: 08937e3134903c5488be506a2dac71e9, type: 2} - m_ExpressionIndex: 312 - m_Value: {fileID: 2800000, guid: 2b99c8622fa96f0448d2715ed6b9bb75, type: 3} + m_Value: {fileID: 2800000, guid: 20c3299842b9328478483930a48b71a5, type: 3} - m_ExpressionIndex: 315 m_Value: {fileID: 2800000, guid: 0b8438754d77a574a8067a3083bce539, type: 3} - m_ExpressionIndex: 316 @@ -13621,7 +13621,7 @@ MonoBehaviour: m_Type: m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"2b99c8622fa96f0448d2715ed6b9bb75","type":3}}' + m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"20c3299842b9328478483930a48b71a5","type":3}}' m_Space: 2147483647 m_Property: name: mainTexture @@ -18988,7 +18988,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Parent: {fileID: 114350483966674976} m_Children: [] - m_UIPosition: {x: -223, y: 2766} + m_UIPosition: {x: -222, y: 2794} m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: @@ -19082,7 +19082,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Parent: {fileID: 114350483966674976} m_Children: [] - m_UIPosition: {x: -24, y: 2918} + m_UIPosition: {x: 36, y: 2795} m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: @@ -23177,7 +23177,7 @@ MonoBehaviour: m_Type: m_SerializableType: UnityEngine.AnimationCurve, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"frames":[{"time":0.0,"value":0.8731205463409424,"inTangent":0.0,"outTangent":0.0,"tangentMode":0,"leftTangentMode":0,"rightTangentMode":0,"broken":false},{"time":0.30000001192092898,"value":1.0,"inTangent":0.0,"outTangent":0.0,"tangentMode":0,"leftTangentMode":0,"rightTangentMode":0,"broken":false},{"time":1.0,"value":0.6636117100715637,"inTangent":0.0,"outTangent":0.0,"tangentMode":0,"leftTangentMode":0,"rightTangentMode":0,"broken":false}],"preWrapMode":8,"postWrapMode":8,"version":1}' + m_SerializableObject: '{"frames":[{"time":0.0,"value":0.8731205463409424,"inTangent":0.0,"outTangent":0.0,"tangentMode":0,"leftTangentMode":0,"rightTangentMode":0,"broken":false},{"time":0.30000001192092898,"value":1.0,"inTangent":0.0,"outTangent":0.0,"tangentMode":0,"leftTangentMode":0,"rightTangentMode":0,"broken":false},{"time":1.0,"value":0.7751687169075012,"inTangent":0.0,"outTangent":0.0,"tangentMode":0,"leftTangentMode":0,"rightTangentMode":0,"broken":false}],"preWrapMode":8,"postWrapMode":8,"version":1}' m_Space: 2147483647 m_Property: name: curve @@ -23284,7 +23284,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Parent: {fileID: 114350483966674976} m_Children: [] - m_UIPosition: {x: -202, y: 2655} + m_UIPosition: {x: -180, y: 2651} m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: [] @@ -24128,7 +24128,7 @@ MonoBehaviour: m_Type: m_SerializableType: System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - m_SerializableObject: 7 + m_SerializableObject: 5 m_Space: 2147483647 m_Property: name: o