diff options
author | chai <215380520@qq.com> | 2023-06-27 18:43:09 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-06-27 18:43:09 +0800 |
commit | 411470e66bcfd9631c7b6f82b0a00e5e1e1b0004 (patch) | |
tree | 9a3d3b453702834eb4ad6a4b7eabb6a7b5422880 | |
parent | 3d1e930feed19641f0f386463f4de33385f24c51 (diff) |
+ stage serialize
39 files changed, 2023 insertions, 74 deletions
diff --git a/WorldlineKeepers/Assets/Bundle/images/backgrounds.meta b/WorldlineKeepers/Assets/Bundle/images/backgrounds.meta new file mode 100644 index 0000000..cf5e50a --- /dev/null +++ b/WorldlineKeepers/Assets/Bundle/images/backgrounds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: daa57a8d72e43fa419103c0f235d7c16 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Art/img/dummy3.png b/WorldlineKeepers/Assets/Bundle/images/backgrounds/dummy3.png Binary files differindex c4ee716..c4ee716 100644 --- a/WorldlineKeepers/Assets/Art/img/dummy3.png +++ b/WorldlineKeepers/Assets/Bundle/images/backgrounds/dummy3.png diff --git a/WorldlineKeepers/Assets/Art/img/dummy3.png.meta b/WorldlineKeepers/Assets/Bundle/images/backgrounds/dummy3.png.meta index 44c68f4..44c68f4 100644 --- a/WorldlineKeepers/Assets/Art/img/dummy3.png.meta +++ b/WorldlineKeepers/Assets/Bundle/images/backgrounds/dummy3.png.meta diff --git a/WorldlineKeepers/Assets/Bundle/metadata/filelist.csv b/WorldlineKeepers/Assets/Bundle/metadata/filelist.csv index d41b78e..f8c982f 100644 --- a/WorldlineKeepers/Assets/Bundle/metadata/filelist.csv +++ b/WorldlineKeepers/Assets/Bundle/metadata/filelist.csv @@ -1,6 +1,6 @@ key,type,root,path ,,, -"#type: 0-csv, 1-json, 2-txt",,, +"#type: 0-csv, 1-json, 2-txt,3-png",,, "#root: 0-bundle, 1-streaming, 2-persistent",,, ,,, #CSV ,,, @@ -27,3 +27,4 @@ default_items,0,0,metadata/default_items.csv ,,, ,,, #Sprites,,, +spr_milk_bg,3,0,images/backgrounds/dummy3.png diff --git a/WorldlineKeepers/Assets/Bundle/stages/stage0/stage.json b/WorldlineKeepers/Assets/Bundle/stages/stage0/stage.json index 4eb7c3f..2e60efe 100644 --- a/WorldlineKeepers/Assets/Bundle/stages/stage0/stage.json +++ b/WorldlineKeepers/Assets/Bundle/stages/stage0/stage.json @@ -1,3 +1,123 @@ { - -}
\ No newline at end of file + "backgrounds": [{ + "fileKey": "spr_milk_bg", + "entityId": null, + "entityName": null, + "entityTransform": { + "localPosition": "0,0,0", + "localRotation": "0,0,0", + "localScale": "1,1,1" + } + } + ], + "colliders": [{ + "colliders": [{ + "shape": 1, + "type": 2, + "offset": "0,0", + "size": "2,2", + "radius": 0.0 + }, { + "shape": 2, + "type": 0, + "offset": "1,3", + "size": "0,0", + "radius": 2.0 + } + ], + "entityId": null, + "entityName": null, + "entityTransform": { + "localPosition": "-15.046,-2.99,0", + "localRotation": "0,0,0", + "localScale": "1,1,1" + } + }, { + "colliders": [{ + "shape": 1, + "type": 2, + "offset": "0,0", + "size": "2,2", + "radius": 0.0 + } + ], + "entityId": null, + "entityName": null, + "entityTransform": { + "localPosition": "-11.01,-2.99,0", + "localRotation": "0,0,0", + "localScale": "1,1,1" + } + }, { + "colliders": [{ + "shape": 1, + "type": 2, + "offset": "0,0", + "size": "2,2", + "radius": 0.0 + } + ], + "entityId": null, + "entityName": null, + "entityTransform": { + "localPosition": "-19.035,-2.99,0", + "localRotation": "0,0,0", + "localScale": "1,1,1" + } + }, { + "colliders": [{ + "shape": 1, + "type": 2, + "offset": "0,0", + "size": "2,2", + "radius": 0.0 + } + ], + "entityId": null, + "entityName": null, + "entityTransform": { + "localPosition": "-7.005,-2.99,0", + "localRotation": "0,0,0", + "localScale": "1,1,1" + } + }, { + "colliders": [{ + "shape": 1, + "type": 2, + "offset": "0,0", + "size": "2,2", + "radius": 0.0 + } + ], + "entityId": null, + "entityName": null, + "entityTransform": { + "localPosition": "1.02,-2.99,0", + "localRotation": "0,0,0", + "localScale": "1,1,1" + } + }, { + "colliders": [{ + "shape": 1, + "type": 2, + "offset": "0,0", + "size": "2,2", + "radius": 0.0 + }, { + "shape": 2, + "type": 0, + "offset": "1,3", + "size": "0,0", + "radius": 2.0 + } + ], + "entityId": null, + "entityName": null, + "entityTransform": { + "localPosition": "-3.016,-2.99,0", + "localRotation": "0,0,0", + "localScale": "1,1,1" + } + } + ] +} diff --git a/WorldlineKeepers/Assets/Scenes/0_Test.unity b/WorldlineKeepers/Assets/Scenes/0_Test.unity index 6c9b7f4..3eae695 100644 --- a/WorldlineKeepers/Assets/Scenes/0_Test.unity +++ b/WorldlineKeepers/Assets/Scenes/0_Test.unity @@ -3176,7 +3176,7 @@ Camera: far clip plane: 1000 field of view: 34 orthographic: 1 - orthographic size: 7.155064 + orthographic size: 7 m_Depth: -1 m_CullingMask: serializedVersion: 2 diff --git a/WorldlineKeepers/Assets/Scripts/Battle/Metadata/StageMetadata.cs b/WorldlineKeepers/Assets/Scripts/Battle/Metadata/StageMetadata.cs index 4a2afdb..240f95b 100644 --- a/WorldlineKeepers/Assets/Scripts/Battle/Metadata/StageMetadata.cs +++ b/WorldlineKeepers/Assets/Scripts/Battle/Metadata/StageMetadata.cs @@ -9,7 +9,7 @@ namespace WK.Data public class EntityTransform { public Vector3 localPosition; - public Quaternion localRotation; + public Vector3 localRotation; public Vector3 localScale; } @@ -19,6 +19,7 @@ namespace WK.Data public abstract class StageEntityMetadata { public string entityId; // 用来引用场景中的对象 + public string entityName; // public EntityTransform entityTransform; } @@ -27,17 +28,39 @@ namespace WK.Data public string fileKey; // 背景图的资源名 } + public class StageEntityMetadata_SingleCollider + { + public StageEntity_Collider.ColliderShape shape; + public ColliderType type; + public Vector2 offset; + public Vector2 size; + public float radius; + } + + public sealed class StageEntityMetadata_Collider : StageEntityMetadata + { + public List<StageEntityMetadata_SingleCollider> colliders; + } + /// <summary> /// 关卡元数据 /// </summary> public class StageMetadata { - public List<string> tests; - public Vector3 pos; - public int count; - - public List<StageEntityMetadata_Background> backgrounds; + public List<StageEntityMetadata_Background> backgrounds = new List<StageEntityMetadata_Background>(); + public List<StageEntityMetadata_Collider> colliders = new List<StageEntityMetadata_Collider>(); + public void Write(StageEntityMetadata meta) + { + if(meta is StageEntityMetadata_Background) + { + backgrounds.Add(meta as StageEntityMetadata_Background); + } + else if (meta is StageEntityMetadata_Collider) + { + colliders.Add(meta as StageEntityMetadata_Collider); + } + } } } diff --git a/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs b/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs new file mode 100644 index 0000000..3ce2663 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs @@ -0,0 +1,19 @@ +using System.Collections; +using System.Collections.Generic; +using System.IO; +using UnityEngine; + +public static class CommonFunction +{ + + public static void WriteFile(string content, string file) + { + if(File.Exists(file)) + { + File.Delete(file); + } + + File.WriteAllText(file, content); + } + +} diff --git a/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs.meta b/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs.meta new file mode 100644 index 0000000..d61d02b --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b9a3413ddfeae9d48b8e4f5983bf3484 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Scripts/Data/DataManager_Func.cs b/WorldlineKeepers/Assets/Scripts/Data/DataManager_Func.cs new file mode 100644 index 0000000..da84bad --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Data/DataManager_Func.cs @@ -0,0 +1,22 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace WK.Data +{ + + public partial class DataManager : Singleton<DataManager> + { + + public FileDescriptor GetFile(string filekey) + { + FileDescriptor descriptor; + if(m_Filelist.TryGetValue(filekey, out descriptor)) + { + return m_Filelist[filekey]; + } + return null; + } + + } +}
\ No newline at end of file diff --git a/WorldlineKeepers/Assets/Scripts/Data/DataManager_Func.cs.meta b/WorldlineKeepers/Assets/Scripts/Data/DataManager_Func.cs.meta new file mode 100644 index 0000000..b324431 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Data/DataManager_Func.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d3bd86dfb681bd544928fa409fe503a1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Scripts/Data/DataManager_Load.cs b/WorldlineKeepers/Assets/Scripts/Data/DataManager_Load.cs index b7fb0b9..e5b78b4 100644 --- a/WorldlineKeepers/Assets/Scripts/Data/DataManager_Load.cs +++ b/WorldlineKeepers/Assets/Scripts/Data/DataManager_Load.cs @@ -17,10 +17,10 @@ namespace WK.Data /// <returns></returns> public CoroutineHandle AsyncLoadAll() { - return Timing.Instance.RunCoroutineOnInstance(AsyncLoadAllData()); + return Timing.Instance.RunCoroutineOnInstance(CoLoadAllData()); } - private IEnumerator<float> AsyncLoadAllData() + private IEnumerator<float> CoLoadAllData() { Load_Filelist(); yield return Timing.WaitForSeconds(StaticDefine.IntervalLoadFile); @@ -33,9 +33,7 @@ namespace WK.Data { TextAsset text = ResourceManager.Instance.LoadAsset<TextAsset>(StaticDefine.FileList); string content = text.text; - List<FileDescriptor> files = CSVReader.Read<FileDescriptor>(content); CSVReader.ReadDictionary<string, FileDescriptor>(m_Filelist, content, "key"); - Debug.Log(m_Filelist.Count); } diff --git a/WorldlineKeepers/Assets/Scripts/Data/Metadata/FileKey.cs b/WorldlineKeepers/Assets/Scripts/Data/Metadata/FileKey.cs index 2fdff3f..51d4d20 100644 --- a/WorldlineKeepers/Assets/Scripts/Data/Metadata/FileKey.cs +++ b/WorldlineKeepers/Assets/Scripts/Data/Metadata/FileKey.cs @@ -8,6 +8,7 @@ namespace WK.Data default_stats, default_buffs, default_items, + spr_milk_bg, all } diff --git a/WorldlineKeepers/Assets/Scripts/Data/Metadata/Filelist.cs b/WorldlineKeepers/Assets/Scripts/Data/Metadata/Filelist.cs index c4ae257..a9f50b2 100644 --- a/WorldlineKeepers/Assets/Scripts/Data/Metadata/Filelist.cs +++ b/WorldlineKeepers/Assets/Scripts/Data/Metadata/Filelist.cs @@ -13,6 +13,7 @@ namespace WK.Data CSV = 0, Json = 1, Txt = 2, + Png = 3, } /// <summary> diff --git a/WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs b/WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs index 4b318ca..0fd18df 100644 --- a/WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs +++ b/WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs @@ -1,9 +1,12 @@ +using LitJson; using System.Collections; using System.Collections.Generic; +using System.IO; #if UNITY_EDITOR using UnityEditor; #endif using UnityEngine; +using WK.Data; namespace WK { @@ -25,7 +28,36 @@ namespace WK #endif } + /// <summary> + /// 根据filekey读资源 + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="fileKey"></param> + /// <returns></returns> + public T LoadFile<T>(string fileKey) where T : UnityEngine.Object + { + FileDescriptor file = DataManager.Instance.GetFile(fileKey); + if (file == null) + return default(T); + if(file.root == FileRoot.Bundle) + { +#if UNITY_EDITOR + string tmp = kAssetRoot + file.path; + T obj = AssetDatabase.LoadAssetAtPath(tmp, typeof(T)) as T; + return obj; +#endif + } + return null; + //else if(file.root == FileRoot.Persistent) + //{ + // string tmp = Application.persistentDataPath + "/" + file.path; + //} + //else if(file.root == FileRoot.Streaming) + //{ + + //} + } } diff --git a/WorldlineKeepers/Assets/Scripts/Phase/GamePhase_Dojo.cs b/WorldlineKeepers/Assets/Scripts/Phase/GamePhase_Dojo.cs index 10dd785..5ae681c 100644 --- a/WorldlineKeepers/Assets/Scripts/Phase/GamePhase_Dojo.cs +++ b/WorldlineKeepers/Assets/Scripts/Phase/GamePhase_Dojo.cs @@ -20,20 +20,6 @@ namespace WK { yield return 0f; } - //SceneMetadata stage = new SceneMetadata(); - //stage.tests = new List<string>() - //{ - // "asdas","asdasd","asdsd" - //}; - //stage.desc = new SceneDesc(); - //stage.desc.name = "namestage"; - //stage.desc.desc = "descddd"; - //stage.pos = new Vector3(1, 2, 3); - //stage.count = 233; - //string json = JsonMapper.ToJson(stage); - //LogHelper.Log(json); - //var s = JsonMapper.ToObject<SceneMetadata>(json); - //Debug.Log(s.pos); } public override IEnumerator<float> OnEnd() diff --git a/WorldlineKeepers/Assets/Scripts/Physics/FastBoxCollider.cs b/WorldlineKeepers/Assets/Scripts/Physics/FastBoxCollider.cs index a644b69..696aaa9 100644 --- a/WorldlineKeepers/Assets/Scripts/Physics/FastBoxCollider.cs +++ b/WorldlineKeepers/Assets/Scripts/Physics/FastBoxCollider.cs @@ -3,13 +3,15 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class FastBoxCollider : MonoBehaviour, IQuadTreeObject +public class FastBoxCollider : FastColliderBase, IQuadTreeObject { [SerializeField] private ColliderType m_Type; [SerializeField] private Vector2 m_Offset; [SerializeField] private Vector2 m_Size; + public ColliderType type { get { return m_Type; } set { m_Type = value; } } + public Vector2 center { get @@ -19,8 +21,8 @@ public class FastBoxCollider : MonoBehaviour, IQuadTreeObject } } - public Vector2 offset => m_Offset; - public Vector2 size => m_Size; + public Vector2 offset { get { return m_Offset; } set { m_Offset = value; } } + public Vector2 size { get { return m_Size; } set { m_Size = value; } } public Vector4 bound { diff --git a/WorldlineKeepers/Assets/Scripts/Physics/FastCircleCollider.cs b/WorldlineKeepers/Assets/Scripts/Physics/FastCircleCollider.cs index 5f04a9f..2e67e42 100644 --- a/WorldlineKeepers/Assets/Scripts/Physics/FastCircleCollider.cs +++ b/WorldlineKeepers/Assets/Scripts/Physics/FastCircleCollider.cs @@ -3,13 +3,15 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class FastCircleCollider : MonoBehaviour, IQuadTreeObject +public class FastCircleCollider : FastColliderBase, IQuadTreeObject { [SerializeField] private ColliderType m_Type; [SerializeField] private float m_Radius; [SerializeField] private Vector2 m_Offset; + public ColliderType type { get { return m_Type; } set { m_Type = value; } } + public Vector2 center { get @@ -19,7 +21,7 @@ public class FastCircleCollider : MonoBehaviour, IQuadTreeObject } } - public float radius => m_Radius; + public float radius { get { return m_Radius; } set { m_Radius = value; } } public Vector4 bound { @@ -48,7 +50,7 @@ public class FastCircleCollider : MonoBehaviour, IQuadTreeObject } } - public Vector2 offset => m_Offset; + public Vector2 offset { get { return m_Offset; } set { m_Offset = value; } } public void Awake() { diff --git a/WorldlineKeepers/Assets/Scripts/Physics/FastColliderBase.cs b/WorldlineKeepers/Assets/Scripts/Physics/FastColliderBase.cs new file mode 100644 index 0000000..a577b53 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Physics/FastColliderBase.cs @@ -0,0 +1,8 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class FastColliderBase : MonoBehaviour +{ + +} diff --git a/WorldlineKeepers/Assets/Scripts/Physics/FastColliderBase.cs.meta b/WorldlineKeepers/Assets/Scripts/Physics/FastColliderBase.cs.meta new file mode 100644 index 0000000..d0cdcb5 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Physics/FastColliderBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b08f2a4c34f47e641baf8b930aa75c1d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntityBase.cs b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntityBase.cs index 43680f5..052fbfa 100644 --- a/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntityBase.cs +++ b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntityBase.cs @@ -1,5 +1,7 @@ +using LitJson; using System.Collections; using System.Collections.Generic; +using UnityEditor.PackageManager.Requests; using UnityEditorInternal; using UnityEngine; using WK.Data; @@ -13,6 +15,16 @@ namespace WK public abstract class StageEntityBase : MonoBehaviour { + protected virtual void Reset() + { + LogHelper.Log("Reset"); + + StageEntityMetadata data = OnSerialize(); + string json = JsonMapper.ToJson(data); + LogHelper.Log(json); + + } + public abstract StageEntityMetadata OnSerialize(); public abstract void OnDeserialize(StageEntityMetadata metadata); @@ -21,9 +33,17 @@ namespace WK { entityTransform = new EntityTransform(); entityTransform.localPosition = transform.localPosition; - entityTransform.localRotation = transform.localRotation; + entityTransform.localRotation = transform.localRotation.eulerAngles; entityTransform.localScale = transform.localScale; - } + } + + protected void RestoreTransform(StageEntityMetadata metadata) + { + var trans = metadata.entityTransform; + transform.localPosition = trans.localPosition; + transform.localScale = trans.localScale; + transform.localRotation = Quaternion.Euler(trans.localRotation); + } } diff --git a/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Background.cs b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Background.cs index 9eae6ab..08b0fa3 100644 --- a/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Background.cs +++ b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Background.cs @@ -7,6 +7,7 @@ using WK.Data; [RequireComponent(typeof(SpriteRenderer))] public class StageEntity_Background : StageEntityBase { + public string fileKey; public override StageEntityMetadata OnSerialize() { @@ -14,11 +15,24 @@ public class StageEntity_Background : StageEntityBase SaveTransform(out bg.entityTransform); + bg.fileKey = fileKey; + return bg; } public override void OnDeserialize(StageEntityMetadata metadata) { + StageEntityMetadata_Background bg = metadata as StageEntityMetadata_Background; + if (bg == null) + return; + + fileKey = bg.fileKey; + + RestoreTransform(bg); + + SpriteRenderer renderer = this.gameObject.GetOrAddComponent<SpriteRenderer>(); + Sprite sprite = ResourceManager.Instance.LoadFile<Sprite>(bg.fileKey); + renderer.sprite = sprite; } } diff --git a/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Collider.cs b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Collider.cs index 0065562..64c3fc6 100644 --- a/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Collider.cs +++ b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Collider.cs @@ -1,39 +1,99 @@ +using mh; using System.Collections; using System.Collections.Generic; +using Unity.VisualScripting; using UnityEngine; using WK; using WK.Data; +/// <summary> +/// 鍦烘櫙纰版挒浣 +/// </summary> public class StageEntity_Collider : StageEntityBase { - public override void OnDeserialize(StageEntityMetadata metadata) + public enum ColliderShape { - throw new System.NotImplementedException(); + ColliderShape_Box = 1, + ColliderShape_Circle = 2, } - public override StageEntityMetadata OnSerialize() + public override void OnDeserialize(StageEntityMetadata arg) { - throw new System.NotImplementedException(); + StageEntityMetadata_Collider metadata = arg as StageEntityMetadata_Collider; + if (metadata == null) + return; + var colliders = metadata.colliders; + if (colliders == null || colliders.Count == 0) + return; + RestoreTransform(arg); + for(int i = 0; i < colliders.Count; i++) + { + var col = colliders[i]; + if (col == null) + continue; + if (col.shape == ColliderShape.ColliderShape_Box) + { + FastBoxCollider box = gameObject.AddComponent<FastBoxCollider>(); + box.type = col.type; + box.offset = col.offset; + box.size = col.size; + } + else if (col.shape == ColliderShape.ColliderShape_Circle) + { + FastCircleCollider circle = gameObject.AddComponent<FastCircleCollider>(); + circle.type = col.type; + circle.radius = col.radius; + circle.offset = col.offset; + } + else + { + LogHelper.LogError("Unkown collider type"); + } + } } - #region 搴忓垪鍖 - - #endregion - - #region 鍏叡瀛楁 - - #endregion - - #region 绉佹湁瀛楁 - #endregion - - private void Awake() - { - // 绉佹湁瀛楁璧嬪 - - // 鍏叡瀛楁璧嬪 - - // 鍒濆鍖 - } + public override StageEntityMetadata OnSerialize() + { + StageEntityMetadata_Collider metadata = new StageEntityMetadata_Collider(); + metadata.colliders = new List<StageEntityMetadata_SingleCollider>(); + SaveTransform(out metadata.entityTransform); + IQuadTreeObject[] cols = GetComponents<IQuadTreeObject>(); + if(cols != null && cols.Length > 0) + { + for(int i = 0; i < cols.Length; ++i) + { + IQuadTreeObject col = cols[i]; + if (col == null) + continue; + StageEntityMetadata_SingleCollider meta = new StageEntityMetadata_SingleCollider(); + if(col is FastBoxCollider) + { + meta.shape = ColliderShape.ColliderShape_Box; + FastBoxCollider box = col as FastBoxCollider; + meta.type = box.type; + meta.offset = box.offset; + meta.size = box.size; + } + else if(col is FastCircleCollider) + { + meta.shape = ColliderShape.ColliderShape_Circle; + FastCircleCollider circle = col as FastCircleCollider; + meta.type = circle.type; + meta.radius = circle.radius; + meta.offset = circle.offset; + } + else + { + LogHelper.LogError("Unkown collider type"); + } + metadata.colliders.Add(meta); + } + } + else + { + return null; + } + return metadata; + } } diff --git a/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Trigger.cs b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Trigger.cs new file mode 100644 index 0000000..bdbbfd3 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Trigger.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using WK; +using WK.Data; + +public class StageEntity_Trigger : StageEntityBase +{ + public override void OnDeserialize(StageEntityMetadata metadata) + { + } + + public override StageEntityMetadata OnSerialize() + { + return null; + } +} diff --git a/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Trigger.cs.meta b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Trigger.cs.meta new file mode 100644 index 0000000..6f5519c --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Stage/Entites/StageEntity_Trigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8aa58c79e14e11944bbf1ccbedf63041 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Scripts/Stage/StageBuilder.cs b/WorldlineKeepers/Assets/Scripts/Stage/StageBuilder.cs new file mode 100644 index 0000000..d117779 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Stage/StageBuilder.cs @@ -0,0 +1,40 @@ +using JetBrains.Annotations; +using MovementEffects; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using WK; +using WK.Data; + +/// <summary> +/// 构建关卡 +/// </summary> +public class StageBuilder : Singleton<StageBuilder> +{ + + public CoroutineHandle AsyncBuildStage(StageMetadata metadata, Transform root = null) + { + return Timing.Instance.RunCoroutineOnInstance(CoBuildStage(metadata, root)); + } + + private void Build<TYPE_ENTITY, TYPE_META>(List<TYPE_META> metadatas, Transform root = null) where TYPE_ENTITY : StageEntityBase where TYPE_META : StageEntityMetadata + { + for(int i = 0; i < metadatas.Count; ++i) + { + TYPE_META meta = metadatas[i]; + GameObject go = new GameObject(); + if(root != null) + go.transform.SetParent(root); + var entity = go.AddComponent<TYPE_ENTITY>(); + entity.OnDeserialize(meta); + } + } + + private IEnumerator<float> CoBuildStage(StageMetadata metadata, Transform root = null) + { + Build<StageEntity_Background, StageEntityMetadata_Background>(metadata.backgrounds, root); + Build<StageEntity_Collider, StageEntityMetadata_Collider>(metadata.colliders, root); + yield return Timing.WaitForSeconds(StaticDefine.IntervalBuildStage); + } + +} diff --git a/WorldlineKeepers/Assets/Scripts/Stage/StageBuilder.cs.meta b/WorldlineKeepers/Assets/Scripts/Stage/StageBuilder.cs.meta new file mode 100644 index 0000000..5194c06 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Stage/StageBuilder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e16177dd5b2b54f41baaa724016782e8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Scripts/StaticDefine.cs b/WorldlineKeepers/Assets/Scripts/StaticDefine.cs index b772d86..f2a9156 100644 --- a/WorldlineKeepers/Assets/Scripts/StaticDefine.cs +++ b/WorldlineKeepers/Assets/Scripts/StaticDefine.cs @@ -11,6 +11,7 @@ namespace WK public class StaticDefine { public const float IntervalLoadFile = 0.1f; + public const float IntervalBuildStage = 0.1f; public static string StatsFilePath = "metadata/default_stats.csv"; public static string BuffFilePath = "metadata/default_buffs.csv"; diff --git a/WorldlineKeepers/Assets/Scripts/Tools/Info.cs b/WorldlineKeepers/Assets/Scripts/Tools/Info.cs new file mode 100644 index 0000000..50e2d42 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Tools/Info.cs @@ -0,0 +1,40 @@ + +public class Info<T0> +{ + public T0 arg0; + + public Info(T0 arg0) + { + this.arg0 = arg0; + } +} +public class Info<T0, T1> : Info<T0> +{ + public T1 arg1; + + public Info(T0 arg0, T1 arg1) + : base(arg0) + { + this.arg1 = arg1; + } +} +public class Info<T0, T1, T2> : Info<T0, T1> +{ + public T2 arg2; + + public Info(T0 arg0, T1 arg1, T2 arg2) + : base(arg0, arg1) + { + this.arg2 = arg2; + } +} +public class Info<T0, T1, T2, T3> : Info<T0, T1, T2> +{ + public T3 arg3; + + public Info(T0 arg0, T1 arg1, T2 arg2, T3 arg3) + : base(arg0, arg1, arg2) + { + this.arg3 = arg3; + } +} diff --git a/WorldlineKeepers/Assets/Scripts/Tools/Info.cs.meta b/WorldlineKeepers/Assets/Scripts/Tools/Info.cs.meta new file mode 100644 index 0000000..4c72025 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Tools/Info.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c5d784cbfaf251f4ba650732770efde9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Scripts/Utils/GameObjectExtensions.cs b/WorldlineKeepers/Assets/Scripts/Utils/GameObjectExtensions.cs new file mode 100644 index 0000000..84ce560 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Utils/GameObjectExtensions.cs @@ -0,0 +1,46 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public static class GameObjectExtensions +{ + public static void SetParent(this GameObject obj, Transform parent) + { + if (!(obj == null)) + { + obj.transform.SetParent(parent); + } + } + + public static GameObject Find(this GameObject obj, string name) + { + if (obj == null) + { + return null; + } + + Transform transform = obj.transform.Find(name); + if (!(transform != null)) + { + return null; + } + + return transform.gameObject; + } + + public static T GetOrAddComponent<T>(this GameObject go) where T : Component + { + if (go == null) + { + return null; + } + + T val = go.GetComponent<T>(); + if ((Object)val == (Object)null) + { + val = go.AddComponent<T>(); + } + + return val; + } +}
\ No newline at end of file diff --git a/WorldlineKeepers/Assets/Scripts/Utils/GameObjectExtensions.cs.meta b/WorldlineKeepers/Assets/Scripts/Utils/GameObjectExtensions.cs.meta new file mode 100644 index 0000000..2dd16b6 --- /dev/null +++ b/WorldlineKeepers/Assets/Scripts/Utils/GameObjectExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 460610b6a0fd5e14ba71f016385ca356 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs b/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs new file mode 100644 index 0000000..b9609a5 --- /dev/null +++ b/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs @@ -0,0 +1,54 @@ +using LitJson; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using WK; +using WK.Data; + +public class LevelEditor : EditorWindow +{ + + private static LevelEditor s_LevelEditorWindow; + + private string m_StageOutFile = "Assets/Bundle/stages/"; + + [MenuItem("Tools/关卡编辑器/Open")] + public static void OpenLevelEditor() + { + s_LevelEditorWindow = GetWindow<LevelEditor>(); + } + + private void OnGUI() + { + m_StageOutFile = GUILayout.TextField(m_StageOutFile); + + if(GUILayout.Button("序列化")) + { + StageMetadata stageMetadata = new StageMetadata(); + + StageEntityBase[] entites = GameObject.FindObjectsOfType<StageEntityBase>(); + if(entites != null && entites.Length > 0) + { + for(int i = 0; i < entites.Length; ++i) + { + StageEntityBase entity = entites[i]; + if (entity == null) + continue; + GameObject go = entity.gameObject; + if (go.name.StartsWith("~")) + continue; + var meta = entity.OnSerialize(); + if(meta != null) + { + stageMetadata.Write(meta); + } + } + } + + string json = JsonMapper.ToJson(stageMetadata); + CommonFunction.WriteFile(json, m_StageOutFile); + } + } + +} diff --git a/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs.meta b/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs.meta new file mode 100644 index 0000000..75397a4 --- /dev/null +++ b/WorldlineKeepers/Assets/Tools/LevelEditor/LevelEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 94eece2d1c67eff469bad905d788299e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Tools/LevelEditor/TestLevel.cs b/WorldlineKeepers/Assets/Tools/LevelEditor/TestLevel.cs new file mode 100644 index 0000000..fd93704 --- /dev/null +++ b/WorldlineKeepers/Assets/Tools/LevelEditor/TestLevel.cs @@ -0,0 +1,34 @@ +using LitJson; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.IO; +using UnityEngine; +using UnityEngine.UI; +using WK.Data; + +public class TestLevel : MonoBehaviour +{ + public InputField m_StageFile; + public UnityEngine.UI.Button m_BtnStage; + + public Transform m_RootStage; + + private void Awake() + { + DataManager.Instance.AsyncLoadAll(); + + m_StageFile.text = "Assets/Bundle/stages/stage0/stage.json"; + + m_BtnStage.onClick.AddListener(OnClickStage); + + } + + void OnClickStage() + { + string file = m_StageFile.text; + string content = File.ReadAllText(file); + StageMetadata metadata = JsonMapper.ToObject<StageMetadata>(content); + StageBuilder.Instance.AsyncBuildStage(metadata, m_RootStage); + } +} diff --git a/WorldlineKeepers/Assets/Tools/LevelEditor/TestLevel.cs.meta b/WorldlineKeepers/Assets/Tools/LevelEditor/TestLevel.cs.meta new file mode 100644 index 0000000..6e71c56 --- /dev/null +++ b/WorldlineKeepers/Assets/Tools/LevelEditor/TestLevel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7e426d9a8daeb8e449abd111653f983a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/WorldlineKeepers/Assets/Tools/LevelEditor/level_editor_scene.unity b/WorldlineKeepers/Assets/Tools/LevelEditor/level_editor_scene.unity index 0f8d70a..10bf66d 100644 --- a/WorldlineKeepers/Assets/Tools/LevelEditor/level_editor_scene.unity +++ b/WorldlineKeepers/Assets/Tools/LevelEditor/level_editor_scene.unity @@ -204,10 +204,7 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 209558657} - - {fileID: 972227290} - - {fileID: 231168132} + m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -223,6 +220,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 05552b78771909c47a18c55d680151c0, type: 3} m_Name: m_EditorClassIdentifier: + fileKey: spr_milk_bg --- !u!1 &209558656 GameObject: m_ObjectHideFlags: 0 @@ -248,13 +246,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 209558656} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -7.005, y: -2.99, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 171571026} - m_RootOrder: 0 + m_Father: {fileID: 0} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &209558658 MonoBehaviour: @@ -308,13 +306,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 231168131} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 1.02, y: -2.99, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 171571026} - m_RootOrder: 2 + m_Father: {fileID: 0} + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &231168133 MonoBehaviour: @@ -343,6 +341,126 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 41d533f99bdb90847a0f443a0ff0b970, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &244913511 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 244913515} + - component: {fileID: 244913514} + - component: {fileID: 244913513} + - component: {fileID: 244913512} + m_Layer: 0 + m_Name: Colliders (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &244913512 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 244913511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: defd292dd15a961418d8ac5721b28712, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Type: 0 + m_Radius: 2 + m_Offset: {x: 1, y: 3} +--- !u!114 &244913513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 244913511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41d533f99bdb90847a0f443a0ff0b970, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &244913514 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 244913511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 310ae84e35289454197ed61078698811, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Type: 2 + m_Offset: {x: 0, y: 0} + m_Size: {x: 2, y: 2} +--- !u!4 &244913515 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 244913511} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -15.046, y: -2.99, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &446512243 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 446512245} + - component: {fileID: 446512244} + m_Layer: 0 + m_Name: Trigger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &446512244 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 446512243} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8aa58c79e14e11944bbf1ccbedf63041, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &446512245 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 446512243} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -8.56, y: 0.44, z: -0.5470367} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &972227289 GameObject: m_ObjectHideFlags: 0 @@ -354,6 +472,7 @@ GameObject: - component: {fileID: 972227290} - component: {fileID: 972227291} - component: {fileID: 972227292} + - component: {fileID: 972227293} m_Layer: 0 m_Name: Colliders (1) m_TagString: Untagged @@ -368,13 +487,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 972227289} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -3.016, y: -2.99, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 171571026} - m_RootOrder: 1 + m_Father: {fileID: 0} + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &972227291 MonoBehaviour: @@ -403,6 +522,81 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 41d533f99bdb90847a0f443a0ff0b970, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &972227293 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 972227289} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: defd292dd15a961418d8ac5721b28712, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Type: 0 + m_Radius: 2 + m_Offset: {x: 1, y: 3} +--- !u!1 &1306754748 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1306754751} + - component: {fileID: 1306754750} + - component: {fileID: 1306754749} + m_Layer: 0 + m_Name: Colliders (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1306754749 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1306754748} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41d533f99bdb90847a0f443a0ff0b970, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1306754750 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1306754748} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 310ae84e35289454197ed61078698811, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Type: 2 + m_Offset: {x: 0, y: 0} + m_Size: {x: 2, y: 2} +--- !u!4 &1306754751 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1306754748} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -11.01, y: -2.99, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1497381753 GameObject: m_ObjectHideFlags: 0 @@ -457,7 +651,7 @@ Camera: far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 5 + orthographic size: 7 m_Depth: -1 m_CullingMask: serializedVersion: 2 @@ -481,7 +675,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1497381753} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalPosition: {x: -5.61, y: -0.39, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -521,3 +715,63 @@ MonoBehaviour: m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 m_Version: 2 +--- !u!1 &1636484679 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1636484682} + - component: {fileID: 1636484681} + - component: {fileID: 1636484680} + m_Layer: 0 + m_Name: Colliders (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1636484680 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1636484679} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41d533f99bdb90847a0f443a0ff0b970, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1636484681 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1636484679} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 310ae84e35289454197ed61078698811, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Type: 2 + m_Offset: {x: 0, y: 0} + m_Size: {x: 2, y: 2} +--- !u!4 &1636484682 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1636484679} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -19.035, y: -2.99, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/WorldlineKeepers/Assets/Tools/LevelEditor/level_test.unity b/WorldlineKeepers/Assets/Tools/LevelEditor/level_test.unity new file mode 100644 index 0000000..aa02ae9 --- /dev/null +++ b/WorldlineKeepers/Assets/Tools/LevelEditor/level_test.unity @@ -0,0 +1,1040 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &22478730 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 22478731} + m_Layer: 0 + m_Name: Root_Stage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &22478731 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 22478730} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &57380525 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 57380526} + - component: {fileID: 57380527} + - component: {fileID: 57380528} + - component: {fileID: 57380529} + m_Layer: 0 + m_Name: TestLevel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &57380526 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 57380525} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &57380527 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 57380525} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7e426d9a8daeb8e449abd111653f983a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_StageFile: {fileID: 308409720} + m_BtnStage: {fileID: 259646324} + m_RootStage: {fileID: 22478731} +--- !u!114 &57380528 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 57380525} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d2433f4570c1404da40af9ea0b12741, type: 3} + m_Name: + m_EditorClassIdentifier: + TimeBetweenSlowUpdateCalls: 0.14285715 + ProfilerDebugAmount: 0 + AutoTriggerManualTimeframe: 1 + UpdateCoroutines: 0 + FixedUpdateCoroutines: 0 + LateUpdateCoroutines: 0 + SlowUpdateCoroutines: 0 + RealtimeUpdateCoroutines: 0 + EditorUpdateCoroutines: 0 + EditorSlowUpdateCoroutines: 0 + EndOfFrameCoroutines: 0 + ManualTimeframeCoroutines: 0 + localTime: 0 + deltaTime: 0 +--- !u!114 &57380529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 57380525} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 42ab9985cd771d24caccb1941aa97895, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &259646322 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 259646323} + - component: {fileID: 259646326} + - component: {fileID: 259646325} + - component: {fileID: 259646324} + m_Layer: 5 + m_Name: Button (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &259646323 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 259646322} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 708334240} + m_Father: {fileID: 896052780} + 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: -277.92, y: 134} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &259646324 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 259646322} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 259646325} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &259646325 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 259646322} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &259646326 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 259646322} + m_CullTransparentMesh: 1 +--- !u!1 &308409718 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 308409719} + - component: {fileID: 308409722} + - component: {fileID: 308409721} + - component: {fileID: 308409720} + m_Layer: 5 + m_Name: InputField (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &308409719 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 308409718} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2136019950} + - {fileID: 1031235038} + m_Father: {fileID: 896052780} + 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: -207, y: 179} + m_SizeDelta: {x: 301.8397, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &308409720 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 308409718} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 308409721} + m_TextComponent: {fileID: 1031235039} + m_Placeholder: {fileID: 2136019951} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 +--- !u!114 &308409721 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 308409718} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &308409722 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 308409718} + m_CullTransparentMesh: 1 +--- !u!1 &708334239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 708334240} + - component: {fileID: 708334242} + - component: {fileID: 708334241} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &708334240 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 708334239} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 259646323} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &708334241 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 708334239} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u52A0\u8F7D" +--- !u!222 &708334242 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 708334239} + m_CullTransparentMesh: 1 +--- !u!1 &766130923 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 766130926} + - component: {fileID: 766130925} + - component: {fileID: 766130924} + - component: {fileID: 766130927} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &766130924 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 766130923} + m_Enabled: 1 +--- !u!20 &766130925 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 766130923} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &766130926 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 766130923} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &766130927 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 766130923} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!1 &893062357 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 893062360} + - component: {fileID: 893062359} + - component: {fileID: 893062358} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &893062358 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 893062357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &893062359 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 893062357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &893062360 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 893062357} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &896052776 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 896052780} + - component: {fileID: 896052779} + - component: {fileID: 896052778} + - component: {fileID: 896052777} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &896052777 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 896052776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &896052778 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 896052776} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &896052779 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 896052776} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &896052780 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 896052776} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 308409719} + - {fileID: 259646323} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1031235037 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1031235038} + - component: {fileID: 1031235040} + - component: {fileID: 1031235039} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1031235038 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1031235037} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 308409719} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1031235039 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1031235037} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1031235040 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1031235037} + m_CullTransparentMesh: 1 +--- !u!1 &2136019949 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2136019950} + - component: {fileID: 2136019952} + - component: {fileID: 2136019951} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2136019950 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2136019949} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 308409719} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2136019951 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2136019949} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u5173\u5361json..." +--- !u!222 &2136019952 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2136019949} + m_CullTransparentMesh: 1 diff --git a/WorldlineKeepers/Assets/Tools/LevelEditor/level_test.unity.meta b/WorldlineKeepers/Assets/Tools/LevelEditor/level_test.unity.meta new file mode 100644 index 0000000..e1b99b9 --- /dev/null +++ b/WorldlineKeepers/Assets/Tools/LevelEditor/level_test.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 730587339c482fa478112bcf08cb4e31 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: |