├── .gitattributes ├── .gitignore ├── Assets ├── Materials.meta ├── Materials │ ├── Ally.mat │ ├── Ally.mat.meta │ ├── Enemy.mat │ ├── Enemy.mat.meta │ ├── Platform.mat │ └── Platform.mat.meta ├── Scenes.meta ├── Scenes │ ├── Main.unity │ └── Main.unity.meta ├── Scripts.meta ├── Scripts │ ├── BoxColliderCasts.cs │ ├── BoxColliderCasts.cs.meta │ ├── Movement.cs │ ├── Movement.cs.meta │ ├── MovingPlatform.cs │ ├── MovingPlatform.cs.meta │ ├── Passenger.cs │ ├── Passenger.cs.meta │ ├── PassengerMover.cs │ ├── PassengerMover.cs.meta │ ├── PlayerInput.cs │ ├── PlayerInput.cs.meta │ ├── PlayerVelocity.cs │ └── PlayerVelocity.cs.meta ├── Sprites.meta ├── Sprites │ ├── High Slope End.png │ ├── High Slope End.png.meta │ ├── High Slope Start.png │ ├── High Slope Start.png.meta │ ├── Low Slope End.png │ ├── Low Slope End.png.meta │ ├── Low Slope Start.png │ ├── Low Slope Start.png.meta │ ├── Slope.png │ ├── Slope.png.meta │ ├── Square.png │ ├── Square.png.meta │ ├── Tile.png │ └── Tile.png.meta ├── Tile Palettes.meta └── Tile Palettes │ ├── Assets.meta │ ├── Assets │ ├── High Slope End.asset │ ├── High Slope End.asset.meta │ ├── High Slope Start.asset │ ├── High Slope Start.asset.meta │ ├── Low Slope End.asset │ ├── Low Slope End.asset.meta │ ├── Low Slope Start.asset │ ├── Low Slope Start.asset.meta │ ├── Slope.asset │ ├── Slope.asset.meta │ ├── Square.asset │ ├── Square.asset.meta │ ├── Tile.asset │ └── Tile.asset.meta │ ├── Prototyping.prefab │ └── Prototyping.prefab.meta ├── LICENSE.md ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /[Ll]ogs/ 7 | /[Uu]ser[Ss]ettings/ 8 | 9 | # MemoryCaptures can get excessive in size. 10 | # They also could contain extremely sensitive data 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | /[Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.aab 57 | *.unitypackage 58 | 59 | # Crashlytics generated file 60 | crashlytics-build.properties 61 | 62 | # Packed Addressables 63 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 64 | 65 | # Temporary auto-generated Android Assets 66 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 67 | /[Aa]ssets/[Ss]treamingAssets/aa/* -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19179512f86e0c645a9fbe06cf6b1c4c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Ally.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Ally 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.30980396, g: 1, b: 0.34665585, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Materials/Ally.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c55e7d7f1d78d9649abf861358c5ea8f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Enemy.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Enemy 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.30980396, g: 0.61309105, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Materials/Enemy.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 096e5cd03e9bd5046a7b94ced2f9bcda 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Platform.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Platform 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/Materials/Platform.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b2d3e50901734545bce697a5754c570 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a828170fd8e786d4db49c8d6a2c1252a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cda990e2423bbf4892e6590ba056729 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ea55b03c53a2d54a8487bad91783d32 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/BoxColliderCasts.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Class to setup needed raycasts around a BoxCollider2D player for proper collision detection 3 | */ 4 | 5 | using UnityEngine; 6 | 7 | [RequireComponent(typeof(BoxCollider2D))] 8 | public class BoxColliderCasts : MonoBehaviour 9 | { 10 | 11 | public LayerMask collisionMask; 12 | 13 | public float skinWidth = .015f; 14 | public float distanceBetweenRays = .25f; 15 | 16 | [HideInInspector] public BoxCollider2D boxCollider; 17 | 18 | [HideInInspector] public int horizontalRayCount; 19 | [HideInInspector] public int verticalRayCount; 20 | 21 | [HideInInspector] public float horizontalRaySpacing; 22 | [HideInInspector] public float verticalRaySpacing; 23 | 24 | public RaycastOrigins raycastOrigins; 25 | public BoxCastOrigins boxCastOrigins; 26 | 27 | [HideInInspector] public float boundsWidth; 28 | [HideInInspector] public float boundsHeight; 29 | 30 | public virtual void Awake() 31 | { 32 | boxCollider = GetComponent(); 33 | } 34 | 35 | public virtual void Start() 36 | { 37 | CalculateRaySpacing(); 38 | } 39 | 40 | public void CalculateRaySpacing() 41 | { 42 | Bounds bounds = boxCollider.bounds; 43 | // Skin width for ray detection even when boxCollider is flush against surfaces 44 | bounds.Expand(skinWidth * -2); 45 | 46 | boundsWidth = bounds.size.x; 47 | boundsHeight = bounds.size.y; 48 | 49 | horizontalRayCount = Mathf.RoundToInt(boundsHeight / distanceBetweenRays); 50 | verticalRayCount = Mathf.RoundToInt(boundsWidth / distanceBetweenRays); 51 | 52 | horizontalRaySpacing = bounds.size.y / (horizontalRayCount - 1); 53 | verticalRaySpacing = bounds.size.x / (verticalRayCount - 1); 54 | } 55 | 56 | public void UpdateRaycastOrigins() 57 | { 58 | Bounds bounds = boxCollider.bounds; 59 | // Skin width for ray detection even when boxCollider is flush against surfaces 60 | bounds.Expand(skinWidth * -2); 61 | 62 | // Match corners of box boxCollider 63 | raycastOrigins.bottomLeft = new Vector2(bounds.min.x, bounds.min.y); 64 | raycastOrigins.bottomRight = new Vector2(bounds.max.x, bounds.min.y); 65 | raycastOrigins.topLeft = new Vector2(bounds.min.x, bounds.max.y); 66 | raycastOrigins.topRight = new Vector2(bounds.max.x, bounds.max.y); 67 | } 68 | 69 | public void UpdateBoxCastOrigins() 70 | { 71 | Bounds bounds = boxCollider.bounds; 72 | 73 | boxCastOrigins.bottomCenter = new Vector2(bounds.center.x, bounds.min.y); 74 | boxCastOrigins.topCenter = new Vector2(bounds.center.x, bounds.max.y); 75 | boxCastOrigins.leftCenter = new Vector2(bounds.min.x, bounds.center.y); 76 | boxCastOrigins.rightCenter = new Vector2(bounds.max.x, bounds.center.y); 77 | } 78 | 79 | public struct RaycastOrigins 80 | { 81 | public Vector2 bottomLeft, bottomRight; 82 | public Vector2 topLeft, topRight; 83 | } 84 | 85 | public struct BoxCastOrigins 86 | { 87 | public Vector2 bottomCenter, topCenter, leftCenter, rightCenter; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Assets/Scripts/BoxColliderCasts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77e7f2c7bed2b8b47a9c2bf256f12c0f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Movement.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Script adjusts object's intended displacement (i.e. movement) based on collision detection from raycasts 3 | * Collision happens with objects with the relevant layermask 4 | */ 5 | 6 | using UnityEngine; 7 | using System.Collections.Generic; 8 | 9 | public class Movement : BoxColliderCasts 10 | { 11 | 12 | [HideInInspector] public CollisionDirection collisionDirection; 13 | [HideInInspector] public CollisionAngle collisionAngle; 14 | [HideInInspector] public Vector2 objectInput; 15 | [HideInInspector] public bool slidingDownMaxSlope = false; 16 | [HideInInspector] public bool forceFall = false; 17 | 18 | private const float wallAngle = 90; 19 | private const float wallTolerence = 1; 20 | [SerializeField] [Range(0f, wallAngle - wallTolerence)] private float maxSlopeAngle = 80; 21 | 22 | private int faceDirection = 0; 23 | private bool passThroughPlatform = false; 24 | private bool ascendSlope = false; 25 | private bool descendSlope = false; 26 | 27 | public override void Start() 28 | { 29 | base.Start(); 30 | } 31 | 32 | /// 33 | /// Checks for collisions then applies correct transform translation to move object 34 | /// 35 | public void Move(Vector2 displacement, Vector2 input) 36 | { 37 | ResetDetection(); 38 | 39 | objectInput = input; 40 | 41 | if (displacement.y < 0) 42 | { 43 | CheckSlopeDescent(ref displacement); 44 | } 45 | 46 | // Check face direction - done after slope descent in case of sliding down max slope 47 | if (displacement.x != 0) 48 | { 49 | faceDirection = (int) Mathf.Sign(displacement.x); 50 | } 51 | 52 | CheckHorizontalCollisions(ref displacement); 53 | 54 | if (displacement.y != 0) 55 | { 56 | CheckVerticalCollisions(ref displacement); 57 | } 58 | 59 | transform.Translate(displacement); 60 | 61 | // Reset grounded variables 62 | if (collisionDirection.below == true) 63 | { 64 | forceFall = false; 65 | } 66 | } 67 | 68 | void ResetDetection() 69 | { 70 | UpdateRaycastOrigins(); 71 | UpdateBoxCastOrigins(); 72 | collisionDirection.Reset(); 73 | collisionAngle.Reset(); 74 | ascendSlope = false; 75 | descendSlope = false; 76 | slidingDownMaxSlope = false; 77 | } 78 | 79 | /// 80 | /// Check horizontal collisions using box cast (more smooth than ray cast), if angle hit found check for ascent 81 | /// 82 | void CheckHorizontalCollisions(ref Vector2 displacement) 83 | { 84 | float directionX = faceDirection; 85 | 86 | // Use 2x skin due box cast origin being brought in 87 | float rayLength = Mathf.Abs(displacement.x) + skinWidth * 2; 88 | 89 | Vector2 boxRayOrigin = (directionX == -1) ? boxCastOrigins.leftCenter : boxCastOrigins.rightCenter; 90 | boxRayOrigin -= Vector2.right * directionX * skinWidth; 91 | 92 | Vector2 boxCastSize = new Vector2(skinWidth, boundsHeight - skinWidth); 93 | 94 | ContactFilter2D contactFilter2D = new ContactFilter2D(); 95 | contactFilter2D.SetLayerMask(collisionMask); 96 | 97 | List results = new List(); 98 | 99 | Physics2D.BoxCast(boxRayOrigin, boxCastSize, 0, Vector2.right * directionX, contactFilter2D, results, rayLength); 100 | 101 | for (int i = 0; i < results.Count; i++) 102 | { 103 | RaycastHit2D hit = results[i]; 104 | if (hit) 105 | { 106 | if (hit.collider.tag == "Through") 107 | { 108 | continue; 109 | } 110 | 111 | float slopeAngle = Vector2.Angle(hit.normal, Vector2.up); 112 | collisionAngle.setSlopeAngle(slopeAngle, hit.normal); 113 | 114 | // Calc slope movement logic when first ray hit is an allowed angled 115 | if (slopeAngle <= maxSlopeAngle) 116 | { 117 | if (descendSlope) 118 | { 119 | descendSlope = false; 120 | } 121 | CheckSlopeAscent(ref displacement, slopeAngle); 122 | } 123 | 124 | if (!ascendSlope || slopeAngle > maxSlopeAngle) 125 | { 126 | // Set displacement be at hit 127 | displacement.x = hit.distance * directionX; 128 | 129 | // Adjust y accordingly using tan(angle) = O/A, to prevent further ascend when wall hit 130 | if (ascendSlope) 131 | { 132 | displacement.y = Mathf.Tan(collisionAngle.slopeAngle * Mathf.Deg2Rad) * Mathf.Abs(displacement.x); 133 | } 134 | 135 | collisionDirection.left = directionX == -1; 136 | collisionDirection.right = directionX == 1; 137 | } 138 | } 139 | } 140 | } 141 | 142 | /// 143 | /// Check vertical collisions using ray cast - not using box cast here as it starts to interfere with horizontal box cast / slopes 144 | /// 145 | void CheckVerticalCollisions(ref Vector2 displacement) 146 | { 147 | float directionY = Mathf.Sign(displacement.y); 148 | float rayLength = Mathf.Abs(displacement.y) + skinWidth; 149 | 150 | for (int i = 0; i < verticalRayCount; i++) 151 | { 152 | // Send out rays to check for collisions for given layer in y dir, starting based on whether travelling up/down 153 | Vector2 rayOrigin = (directionY == -1) ? raycastOrigins.bottomLeft : raycastOrigins.topLeft; 154 | // Note additional distance from movement in x dir needed to adjust rayOrigin correctly 155 | rayOrigin += Vector2.right * (verticalRaySpacing * i + displacement.x); 156 | RaycastHit2D hit = Physics2D.Raycast(rayOrigin, Vector2.up * directionY, rayLength, collisionMask); 157 | 158 | if (hit) 159 | { 160 | // Shows green ray if hit detected 161 | Debug.DrawRay(rayOrigin, Vector2.up * directionY, Color.green); 162 | 163 | // Allow drop/jump through "Through" platforms 164 | if (hit.collider.tag == "Through") 165 | { 166 | if (directionY == 1 || hit.distance == 0) 167 | { 168 | continue; 169 | } 170 | if (passThroughPlatform) 171 | { 172 | continue; 173 | } 174 | if (objectInput.y == -1) 175 | { 176 | passThroughPlatform = true; 177 | Invoke("ResetPassThroughPlatform", .5f); 178 | continue; 179 | } 180 | } 181 | 182 | // Move object to just before the hit ray 183 | displacement.y = (hit.distance - skinWidth) * directionY; 184 | // Adjust ray length to make sure future rays don't lead to further movement past current hit 185 | rayLength = hit.distance; 186 | 187 | // Adjust x accordingly using tan(angle) = O/A, to prevent further ascend when ceiling hit 188 | if (ascendSlope) 189 | { 190 | displacement.x = displacement.y / Mathf.Tan(collisionAngle.slopeAngle * Mathf.Deg2Rad) * Mathf.Sign(displacement.x); 191 | } 192 | 193 | collisionDirection.below = directionY == -1; 194 | collisionDirection.above = directionY == 1; 195 | } 196 | else 197 | { 198 | // Draw remaining rays being checked 199 | Debug.DrawRay(rayOrigin, Vector2.up * directionY, Color.red); 200 | } 201 | } 202 | 203 | } 204 | 205 | void ResetPassThroughPlatform() 206 | { 207 | passThroughPlatform = false; 208 | } 209 | 210 | /// 211 | /// Use of trig to work out X/Y components of displacement up slope 212 | /// 213 | void CheckSlopeAscent(ref Vector2 displacement, float slopeAngle) 214 | { 215 | /// Use intended x dir speed for moveDistance (H) up slope 216 | float moveDistance = Mathf.Abs(displacement.x); 217 | /// Work out ascendDisplacementY (O) with Sin(angle)=O/H 218 | float ascendDisplacementY = Mathf.Sin(slopeAngle * Mathf.Deg2Rad) * moveDistance; 219 | 220 | // Check if object is jumping already before ascend 221 | if (displacement.y <= ascendDisplacementY) 222 | { 223 | displacement.y = ascendDisplacementY; 224 | /// Work out ascendDisplacementX (A) with Cos(angle)=A/H 225 | displacement.x = Mathf.Cos(slopeAngle * Mathf.Deg2Rad) * moveDistance * Mathf.Sign(displacement.x); 226 | collisionDirection.below = true; 227 | ascendSlope = true; 228 | } 229 | } 230 | 231 | /// 232 | /// Use of trig to work out X/Y components of displacement down slope 233 | /// Additional checks done for max slope descent 234 | /// 235 | void CheckSlopeDescent(ref Vector2 displacement) 236 | { 237 | // Check for max slope angle hits, XOR ensures only on side checked at a time 238 | RaycastHit2D maxSlopeHitLeft = Physics2D.Raycast(raycastOrigins.bottomLeft, Vector2.down, Mathf.Abs(displacement.y) + skinWidth, collisionMask); 239 | RaycastHit2D maxSlopeHitRight = Physics2D.Raycast(raycastOrigins.bottomRight, Vector2.down, Mathf.Abs(displacement.y) + skinWidth, collisionMask); 240 | if (maxSlopeHitLeft ^ maxSlopeHitRight) 241 | { 242 | if (maxSlopeHitLeft) 243 | { 244 | SlideDownMaxSlope(maxSlopeHitLeft, ref displacement); 245 | } else 246 | { 247 | SlideDownMaxSlope(maxSlopeHitRight, ref displacement); 248 | } 249 | } 250 | // Fix jittering at the end of sliding from max slope 251 | else if (maxSlopeHitLeft && maxSlopeHitRight) 252 | { 253 | if( maxSlopeHitLeft.distance < maxSlopeHitRight.distance ) 254 | { 255 | SlideDownMaxSlope( maxSlopeHitLeft , ref displacement ); 256 | } 257 | else 258 | { 259 | SlideDownMaxSlope( maxSlopeHitRight , ref displacement ); 260 | } 261 | } 262 | 263 | if (!slidingDownMaxSlope) 264 | { 265 | float directionX = Mathf.Sign(displacement.x); 266 | Vector2 rayOrigin = (directionX == -1) ? raycastOrigins.bottomRight : raycastOrigins.bottomLeft; 267 | // Cast ray downwards infinitly to check for slope 268 | RaycastHit2D hit = Physics2D.Raycast(rayOrigin, -Vector2.up, Mathf.Infinity, collisionMask); 269 | 270 | if (hit) 271 | { 272 | float slopeAngle = Vector2.Angle(hit.normal, Vector2.up); 273 | collisionAngle.setSlopeAngle(slopeAngle, hit.normal); 274 | 275 | bool descendableSlope = slopeAngle != 0 && slopeAngle <= maxSlopeAngle; 276 | bool moveInSlopeDirection = Mathf.Sign(hit.normal.x) == directionX; 277 | // Calculate accordingly using tan(angle) = O/A, to prevent further falling when slope hit 278 | bool fallingToSlope = hit.distance - skinWidth <= Mathf.Tan(slopeAngle * Mathf.Deg2Rad) * Mathf.Abs(displacement.x); 279 | 280 | if (descendableSlope && moveInSlopeDirection && fallingToSlope) 281 | { 282 | /// Use intended x dir speed for moveDistance (H) down slope 283 | float moveDistance = Mathf.Abs(displacement.x); 284 | /// Work out descendDisplacementY (O) with Sin(angle)=O/H 285 | float descendDisplacementY = Mathf.Sin(slopeAngle * Mathf.Deg2Rad) * moveDistance; 286 | /// Work out descendDisplacementX (A) with Cos(angle)=A/H 287 | displacement.x = Mathf.Cos(slopeAngle * Mathf.Deg2Rad) * moveDistance * Mathf.Sign(displacement.x); 288 | displacement.y -= descendDisplacementY; 289 | 290 | descendSlope = true; 291 | collisionDirection.below = true; 292 | } 293 | } 294 | } 295 | } 296 | 297 | /// 298 | /// Slides down a non-climbable i.e. max slope based on gravity component affecting y 299 | /// 300 | void SlideDownMaxSlope(RaycastHit2D hit, ref Vector2 displacement) 301 | { 302 | float slopeAngle = Vector2.Angle(hit.normal, Vector2.up); 303 | collisionAngle.setSlopeAngle(slopeAngle, hit.normal); 304 | if (slopeAngle > maxSlopeAngle && slopeAngle < wallAngle - wallTolerence) 305 | { 306 | // Calculate accordingly using tan(angle) = O / A, to slide on slope, where x (A), where y (O) 307 | displacement.x = Mathf.Sign(hit.normal.x) * (Mathf.Abs(displacement.y) - hit.distance) / Mathf.Tan(slopeAngle * Mathf.Deg2Rad); 308 | slidingDownMaxSlope = true; 309 | } 310 | } 311 | 312 | /// 313 | /// Contains information about the most recent collision's directions 314 | /// 315 | public struct CollisionDirection 316 | { 317 | public bool above, below; 318 | public bool left, right; 319 | 320 | public void Reset() 321 | { 322 | above = below = false; 323 | left = right = false; 324 | } 325 | } 326 | 327 | /// 328 | /// Contains information about the most recent collision's slope 329 | /// 330 | public struct CollisionAngle 331 | { 332 | public float slopeAngle; 333 | public Vector2 slopeNormal; 334 | public bool onWall; 335 | 336 | public void Reset() 337 | { 338 | slopeAngle = 0; 339 | slopeNormal = Vector2.zero; 340 | onWall = false; 341 | } 342 | 343 | public void setSlopeAngle(float angle, Vector2 normal) 344 | { 345 | slopeAngle = angle; 346 | slopeNormal = normal; 347 | 348 | bool wallHit = (wallAngle - wallTolerence < slopeAngle) && (slopeAngle < wallAngle + wallTolerence); 349 | if (wallHit) 350 | { 351 | onWall = true; 352 | } 353 | } 354 | } 355 | 356 | } 357 | -------------------------------------------------------------------------------- /Assets/Scripts/Movement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3226708d3c453dc409ffbed4bbff1013 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/MovingPlatform.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class MovingPlatform : MonoBehaviour 4 | { 5 | 6 | public Vector3[] localWaypoints; 7 | Vector3[] globalWaypoints; 8 | 9 | public float speed; 10 | public bool cyclic; 11 | public float waitTime; 12 | [Range(0, 2)] 13 | public float easeAmount; 14 | 15 | int fromWaypointIndex; 16 | float percentBetweenWaypoints; 17 | float nextMoveTime; 18 | 19 | PassengerMover passengerMover; 20 | 21 | void Start() 22 | { 23 | 24 | globalWaypoints = new Vector3[localWaypoints.Length]; 25 | for (int i = 0; i < localWaypoints.Length; i++) 26 | { 27 | globalWaypoints[i] = localWaypoints[i] + transform.position; 28 | } 29 | 30 | passengerMover = GetComponent(); 31 | } 32 | 33 | void Update() 34 | { 35 | 36 | if (globalWaypoints.Length > 0) 37 | { 38 | Vector3 displacement = CalculatePlatformMovement(); 39 | 40 | if (passengerMover) 41 | { 42 | passengerMover.CalculatePassengerMovement(displacement); 43 | 44 | passengerMover.MovePassengers(true); 45 | transform.Translate(displacement); 46 | passengerMover.MovePassengers(false); 47 | 48 | } else 49 | { 50 | transform.Translate(displacement); 51 | } 52 | } 53 | } 54 | 55 | float Ease(float x) 56 | { 57 | float a = easeAmount + 1; 58 | return Mathf.Pow(x, a) / (Mathf.Pow(x, a) + Mathf.Pow(1 - x, a)); 59 | } 60 | 61 | Vector3 CalculatePlatformMovement() 62 | { 63 | 64 | if (Time.time < nextMoveTime) 65 | { 66 | return Vector3.zero; 67 | } 68 | 69 | fromWaypointIndex %= globalWaypoints.Length; 70 | int toWaypointIndex = (fromWaypointIndex + 1) % globalWaypoints.Length; 71 | float distanceBetweenWaypoints = Vector3.Distance(globalWaypoints[fromWaypointIndex], globalWaypoints[toWaypointIndex]); 72 | percentBetweenWaypoints += Time.deltaTime * speed / distanceBetweenWaypoints; 73 | percentBetweenWaypoints = Mathf.Clamp01(percentBetweenWaypoints); 74 | float easedPercentBetweenWaypoints = Ease(percentBetweenWaypoints); 75 | 76 | Vector3 newPos = Vector3.Lerp(globalWaypoints[fromWaypointIndex], globalWaypoints[toWaypointIndex], easedPercentBetweenWaypoints); 77 | 78 | if (percentBetweenWaypoints >= 1) 79 | { 80 | percentBetweenWaypoints = 0; 81 | fromWaypointIndex++; 82 | 83 | if (!cyclic) 84 | { 85 | if (fromWaypointIndex >= globalWaypoints.Length - 1) 86 | { 87 | fromWaypointIndex = 0; 88 | System.Array.Reverse(globalWaypoints); 89 | } 90 | } 91 | nextMoveTime = Time.time + waitTime; 92 | } 93 | 94 | return newPos - transform.position; 95 | } 96 | 97 | void OnDrawGizmos() 98 | { 99 | if (localWaypoints != null) 100 | { 101 | Gizmos.color = Color.red; 102 | float size = .3f; 103 | 104 | for (int i = 0; i < localWaypoints.Length; i++) 105 | { 106 | Vector3 globalWaypointPos = (Application.isPlaying) ? globalWaypoints[i] : localWaypoints[i] + transform.position; 107 | Gizmos.DrawLine(globalWaypointPos - Vector3.up * size, globalWaypointPos + Vector3.up * size); 108 | Gizmos.DrawLine(globalWaypointPos - Vector3.left * size, globalWaypointPos + Vector3.left * size); 109 | } 110 | } 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /Assets/Scripts/MovingPlatform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46a83c85dde1ac249baffc29a989379a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Passenger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// Object can be moved by passenger movers 5 | /// 6 | public class Passenger : MonoBehaviour 7 | { 8 | /// 9 | /// Move passenger by given displacement 10 | /// 11 | public void Move(Vector2 displacement, bool standingOnPlatform) 12 | { 13 | PassengerMover passengerMover = gameObject.GetComponent(); 14 | 15 | if (passengerMover) 16 | { 17 | passengerMover.CalculatePassengerMovement(displacement); 18 | 19 | passengerMover.MovePassengers(true); 20 | MoveTarget(displacement); 21 | passengerMover.MovePassengers(false); 22 | } else 23 | { 24 | MoveTarget(displacement); 25 | } 26 | } 27 | 28 | void MoveTarget(Vector2 displacement) 29 | { 30 | if (gameObject.tag == "Player" || gameObject.tag == "Enemy" || gameObject.tag == "Ally") 31 | { 32 | Movement movement = GetComponent(); 33 | if (movement) 34 | { 35 | movement.Move(displacement, Vector2.zero); 36 | } 37 | else 38 | { 39 | Debug.LogError("gameObject requires movement script if passenger"); 40 | } 41 | } 42 | else 43 | { 44 | transform.Translate(displacement); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/Scripts/Passenger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34ac2fa4cd64c4e48956a820ac17d7cd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/PassengerMover.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | public class PassengerMover : BoxColliderCasts 5 | { 6 | public LayerMask passengerMask; 7 | 8 | List passengerMovement; 9 | Dictionary passengerDictionary = new Dictionary(); 10 | 11 | public override void Start() 12 | { 13 | base.Start(); 14 | } 15 | 16 | void Update() 17 | { 18 | UpdateBoxCastOrigins(); 19 | } 20 | 21 | public void CalculatePassengerMovement(Vector3 displacement) 22 | { 23 | HashSet movedPassengers = new HashSet(); 24 | passengerMovement = new List(); 25 | 26 | float directionX = Mathf.Sign(displacement.x); 27 | float directionY = Mathf.Sign(displacement.y); 28 | 29 | // Vertically moving platform 30 | if (displacement.y != 0) 31 | { 32 | float rayLength = Mathf.Abs(displacement.y); 33 | 34 | Vector2 boxRayOrigin = (directionY == -1) ? boxCastOrigins.bottomCenter : boxCastOrigins.topCenter; 35 | Vector2 boxCastSize = new Vector2(boundsWidth, skinWidth); 36 | ContactFilter2D contactFilter2D = new ContactFilter2D(); 37 | contactFilter2D.SetLayerMask(passengerMask); 38 | List results = new List(); 39 | 40 | Physics2D.BoxCast(boxRayOrigin, boxCastSize, 0, Vector2.up * directionY, contactFilter2D, results, rayLength); 41 | 42 | results.ForEach(delegate (RaycastHit2D hit) 43 | { 44 | if (hit) 45 | { 46 | if (!movedPassengers.Contains(hit.transform)) 47 | { 48 | movedPassengers.Add(hit.transform); 49 | 50 | float pushX = (directionY == 1) ? displacement.x : 0; 51 | float pushY = displacement.y - (hit.distance) * directionY; 52 | 53 | passengerMovement.Add(new PassengerMovement(hit.transform, new Vector3(pushX, pushY), directionY == 1, true)); 54 | } 55 | } 56 | }); 57 | } 58 | 59 | // Horizontally moving platform 60 | if (displacement.x != 0) 61 | { 62 | float rayLength = Mathf.Abs(displacement.x); 63 | 64 | Vector2 boxRayOrigin = (directionX == -1) ? boxCastOrigins.leftCenter : boxCastOrigins.rightCenter; 65 | Vector2 boxCastSize = new Vector2(skinWidth, boundsHeight); 66 | ContactFilter2D contactFilter2D = new ContactFilter2D(); 67 | contactFilter2D.SetLayerMask(passengerMask); 68 | List results = new List(); 69 | 70 | Physics2D.BoxCast(boxRayOrigin, boxCastSize, 0, Vector2.right * directionX, contactFilter2D, results, rayLength); 71 | 72 | results.ForEach(delegate (RaycastHit2D hit) 73 | { 74 | if (hit) 75 | { 76 | if (!movedPassengers.Contains(hit.transform)) 77 | { 78 | movedPassengers.Add(hit.transform); 79 | 80 | float pushX = displacement.x - (hit.distance - skinWidth) * directionX; 81 | float pushY = -skinWidth; 82 | 83 | passengerMovement.Add(new PassengerMovement(hit.transform, new Vector3(pushX, pushY), false, true)); 84 | } 85 | } 86 | }); 87 | } 88 | 89 | // Passenger on top of a horizontally or downward moving platform 90 | if (directionY == -1 || displacement.y == 0 && displacement.x != 0) 91 | { 92 | Vector2 boxCastSize = new Vector2(boundsWidth, skinWidth); 93 | ContactFilter2D contactFilter2D = new ContactFilter2D(); 94 | contactFilter2D.SetLayerMask(passengerMask); 95 | List results = new List(); 96 | 97 | Physics2D.BoxCast(boxCastOrigins.topCenter, boxCastSize, 0, Vector2.up, contactFilter2D, results, skinWidth); 98 | 99 | results.ForEach(delegate (RaycastHit2D hit) 100 | { 101 | if (hit) 102 | { 103 | if (!movedPassengers.Contains(hit.transform)) 104 | { 105 | movedPassengers.Add(hit.transform); 106 | float pushX = displacement.x; 107 | float pushY = displacement.y; 108 | 109 | passengerMovement.Add(new PassengerMovement(hit.transform, new Vector3(pushX, pushY), true, false)); 110 | } 111 | } 112 | }); 113 | } 114 | } 115 | 116 | public void MovePassengers(bool beforeMovePlatform) 117 | { 118 | foreach (PassengerMovement passenger in passengerMovement) 119 | { 120 | if (!passengerDictionary.ContainsKey(passenger.transform)) 121 | { 122 | passengerDictionary.Add(passenger.transform, passenger.transform.GetComponent()); 123 | } 124 | 125 | if (passenger.moveBeforePlatform == beforeMovePlatform) 126 | { 127 | passengerDictionary[passenger.transform].Move(passenger.displacement, passenger.standingOnPlatform); 128 | } 129 | } 130 | } 131 | 132 | struct PassengerMovement 133 | { 134 | public Transform transform; 135 | public Vector3 displacement; 136 | public bool standingOnPlatform; 137 | public bool moveBeforePlatform; 138 | 139 | public PassengerMovement(Transform _transform, Vector3 _displacement, bool _standingOnPlatform, bool _moveBeforePlatform) 140 | { 141 | transform = _transform; 142 | displacement = _displacement; 143 | standingOnPlatform = _standingOnPlatform; 144 | moveBeforePlatform = _moveBeforePlatform; 145 | } 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /Assets/Scripts/PassengerMover.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d232c8155c3ab6a4fbd7088af4cdd349 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/PlayerInput.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | [RequireComponent(typeof(PlayerVelocity))] 4 | public class PlayerInput : MonoBehaviour 5 | { 6 | 7 | private PlayerVelocity playerVelocity; 8 | 9 | void Start() 10 | { 11 | playerVelocity = GetComponent(); 12 | } 13 | 14 | void Update() 15 | { 16 | Vector2 directionalInput = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); 17 | playerVelocity.SetDirectionalInput(directionalInput); 18 | 19 | if (Input.GetKeyDown(KeyCode.W)) 20 | { 21 | playerVelocity.OnJumpInputDown(); 22 | } 23 | if (Input.GetKeyUp(KeyCode.W)) 24 | { 25 | playerVelocity.OnJumpInputUp(); 26 | } 27 | if (Input.GetKeyDown(KeyCode.S)) 28 | { 29 | playerVelocity.OnFallInputDown(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Assets/Scripts/PlayerInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 463318c2291d8b54f8b12d3e9a18f701 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/PlayerVelocity.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Script gets player's intended velocity & displacement (caused by enviroment variables + user input which is taken from PlayerInput) 3 | * See for equations/physics: https://en.wikipedia.org/wiki/Equations_of_motion 4 | * See: http://lolengine.net/blog/2011/12/14/understanding-motion-in-games for Verlet integration vs. Euler 5 | */ 6 | 7 | using UnityEngine; 8 | 9 | [RequireComponent(typeof(Movement))] 10 | public class PlayerVelocity : MonoBehaviour 11 | { 12 | 13 | [SerializeField] private float moveSpeed = 6; 14 | [SerializeField] private float maxJumpHeight = 4; 15 | [SerializeField] private float minJumpHeight = 1; 16 | [SerializeField] private float timeToJumpApex = .4f; 17 | [SerializeField] private float accelerationTimeAirborne = .2f; 18 | [SerializeField] private float accelerationTimeGrounded = .1f; 19 | [SerializeField] private float forceFallSpeed = 20; 20 | 21 | [SerializeField] private Vector2 wallJump; 22 | [SerializeField] private Vector2 wallJumpClimb; 23 | [SerializeField] private Vector2 wallLeapOff; 24 | 25 | [SerializeField] private float wallSlideSpeedMax = 3; 26 | [SerializeField] private float wallStickTime = .25f; 27 | 28 | private float timeToWallUnstick; 29 | private float gravity; 30 | private float maxJumpVelocity; 31 | private float minJumpVelocity; 32 | private Vector3 velocity; 33 | private Vector3 oldVelocity; 34 | private float velocityXSmoothing; 35 | 36 | private Movement playerMovement; 37 | 38 | private Vector2 directionalInput; 39 | private bool wallContact; 40 | private int wallDirX; 41 | 42 | void Start() 43 | { 44 | playerMovement = GetComponent(); 45 | 46 | // see suvat calculations; s = ut + 1/2at^2, v^2 = u^2 + 2at, where u=0, scalar looking at only y dir 47 | gravity = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2); 48 | maxJumpVelocity = Mathf.Abs(gravity) * timeToJumpApex; 49 | minJumpVelocity = Mathf.Sqrt(2 * Mathf.Abs(gravity) * minJumpHeight); 50 | } 51 | 52 | void Update() 53 | { 54 | CalculateVelocity(); 55 | HandleWallSliding(); 56 | 57 | // r = r0 + 1/2(v+v0)t, note Vector version used here 58 | // displacement = 1/2(v+v0)t since the playerMovementController uses Translate which moves from r0 59 | Vector3 displacement = (velocity + oldVelocity) * 0.5f * Time.deltaTime; 60 | // Move player using movement controller which checks for collisions then applies correct transform (displacement) translation 61 | playerMovement.Move(displacement, directionalInput); 62 | 63 | bool verticalCollision = playerMovement.collisionDirection.above || playerMovement.collisionDirection.below; 64 | 65 | if (verticalCollision) 66 | { 67 | if (playerMovement.slidingDownMaxSlope) 68 | { 69 | velocity.y += playerMovement.collisionAngle.slopeNormal.y * -gravity * Time.deltaTime; 70 | } 71 | else 72 | { 73 | velocity.y = 0; 74 | } 75 | } 76 | } 77 | 78 | void CalculateVelocity() 79 | { 80 | // suvat; s = ut, note a=0 81 | float targetVelocityX = directionalInput.x * moveSpeed; 82 | oldVelocity = velocity; 83 | // ms when player is on the ground faster vs. in air 84 | float smoothTime = (playerMovement.collisionDirection.below) ? accelerationTimeGrounded : accelerationTimeAirborne; 85 | velocity.x = Mathf.SmoothDamp(velocity.x, targetVelocityX, ref velocityXSmoothing, smoothTime); 86 | velocity.y += gravity * Time.deltaTime; 87 | } 88 | 89 | void HandleWallSliding() 90 | { 91 | wallDirX = (playerMovement.collisionDirection.left) ? -1 : 1; 92 | bool horizontalCollision = playerMovement.collisionDirection.left || playerMovement.collisionDirection.right; 93 | 94 | if (horizontalCollision && !playerMovement.collisionDirection.below && !playerMovement.forceFall && playerMovement.collisionAngle.onWall) 95 | { 96 | wallContact = true; 97 | 98 | // Check if falling down - only wall slide then 99 | if (velocity.y < 0) 100 | { 101 | // Grab wall if input facing wall 102 | if (directionalInput.x == wallDirX) 103 | { 104 | velocity.y = 0; 105 | } 106 | else 107 | { 108 | // Only slow down if falling faster than slide speed 109 | if (velocity.y < -wallSlideSpeedMax) 110 | { 111 | velocity.y = -wallSlideSpeedMax; 112 | } 113 | 114 | // Stick to wall until timeToWallUnstick has counted down to 0 from wallStickTime 115 | if (timeToWallUnstick > 0) 116 | { 117 | velocityXSmoothing = 0; 118 | velocity.x = 0; 119 | 120 | if (directionalInput.x != wallDirX && directionalInput.x != 0) 121 | { 122 | timeToWallUnstick -= Time.deltaTime; 123 | } 124 | else 125 | { 126 | timeToWallUnstick = wallStickTime; 127 | } 128 | } 129 | else 130 | { 131 | timeToWallUnstick = wallStickTime; 132 | } 133 | } 134 | } 135 | 136 | } else 137 | { 138 | wallContact = false; 139 | } 140 | 141 | } 142 | 143 | /* Public Functions used by PlayerInput script */ 144 | 145 | /// 146 | /// Handle horizontal movement input 147 | /// 148 | public void SetDirectionalInput(Vector2 input) 149 | { 150 | directionalInput = input; 151 | } 152 | 153 | /// 154 | /// Handle jumps 155 | /// 156 | public void OnJumpInputDown() 157 | { 158 | if (wallContact) 159 | { 160 | // Standard wall jump 161 | if (directionalInput.x == 0) 162 | { 163 | velocity.x = -wallDirX * wallJump.x; 164 | velocity.y = wallJump.y; 165 | } 166 | // Climb up if input is facing wall 167 | else if (wallDirX == directionalInput.x) 168 | { 169 | velocity.x = -wallDirX * wallJumpClimb.x; 170 | velocity.y = wallJumpClimb.y; 171 | } 172 | // Leap wall if input facing away from wall 173 | else 174 | { 175 | velocity.x = -wallDirX * wallLeapOff.x; 176 | velocity.y = wallLeapOff.y; 177 | } 178 | } 179 | if (playerMovement.collisionDirection.below) 180 | { 181 | if (playerMovement.slidingDownMaxSlope) 182 | { 183 | // Jumping away from max slope dir 184 | if (directionalInput.x != -Mathf.Sign(playerMovement.collisionAngle.slopeNormal.x)) 185 | { 186 | velocity.y = maxJumpVelocity * playerMovement.collisionAngle.slopeNormal.y; 187 | velocity.x = maxJumpVelocity * playerMovement.collisionAngle.slopeNormal.x; 188 | } 189 | } 190 | else 191 | { 192 | velocity.y = maxJumpVelocity; 193 | } 194 | } 195 | } 196 | 197 | /// 198 | /// Handle not fully commited jumps - allow for mini jumps 199 | /// 200 | public void OnJumpInputUp() 201 | { 202 | if (velocity.y > minJumpVelocity) 203 | { 204 | velocity.y = minJumpVelocity; 205 | } 206 | } 207 | 208 | /// 209 | /// Handle down direction - force fall 210 | /// 211 | public void OnFallInputDown() 212 | { 213 | if (!playerMovement.collisionDirection.below) 214 | { 215 | velocity.y = -forceFallSpeed; 216 | playerMovement.forceFall = true; 217 | } 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /Assets/Scripts/PlayerVelocity.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f84870e07f23e5e4c9b1077b6475931f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26bc163b04e7e4d40b95dba567e89cd1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Sprites/High Slope End.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krthush/2d-unity-movement/e5009d699a6eb0decc9d3756ada356b9e25f7de5/Assets/Sprites/High Slope End.png -------------------------------------------------------------------------------- /Assets/Sprites/High Slope End.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78673128654a6fb43b98030d23062e13 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 3 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 4 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: 0 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | ignorePngGamma: 0 62 | applyGammaDecoding: 0 63 | platformSettings: 64 | - serializedVersion: 3 65 | buildTarget: DefaultTexturePlatform 66 | maxTextureSize: 2048 67 | resizeAlgorithm: 0 68 | textureFormat: 4 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | androidETC2FallbackOverride: 0 75 | forceMaximumCompressionQuality_BC6H_BC7: 0 76 | spriteSheet: 77 | serializedVersion: 2 78 | sprites: [] 79 | outline: 80 | - - {x: 2, y: 2} 81 | - {x: 0, y: -2} 82 | - {x: 2, y: -2} 83 | physicsShape: 84 | - - {x: 0, y: -2} 85 | - {x: 2, y: -2} 86 | - {x: 2, y: 2} 87 | bones: [] 88 | spriteID: 5e97eb03825dee720800000000000000 89 | internalID: 0 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | secondaryTextures: [] 95 | spritePackingTag: 96 | pSDRemoveMatte: 0 97 | pSDShowRemoveMatteOption: 0 98 | userData: 99 | assetBundleName: 100 | assetBundleVariant: 101 | -------------------------------------------------------------------------------- /Assets/Sprites/High Slope Start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krthush/2d-unity-movement/e5009d699a6eb0decc9d3756ada356b9e25f7de5/Assets/Sprites/High Slope Start.png -------------------------------------------------------------------------------- /Assets/Sprites/High Slope Start.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c562dae8f023194e8075e4afc59c69b 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 3 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 4 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: 0 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | ignorePngGamma: 0 62 | applyGammaDecoding: 0 63 | platformSettings: 64 | - serializedVersion: 3 65 | buildTarget: DefaultTexturePlatform 66 | maxTextureSize: 2048 67 | resizeAlgorithm: 0 68 | textureFormat: 4 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | androidETC2FallbackOverride: 0 75 | forceMaximumCompressionQuality_BC6H_BC7: 0 76 | spriteSheet: 77 | serializedVersion: 2 78 | sprites: [] 79 | outline: 80 | - - {x: 2, y: 2} 81 | - {x: 0, y: 2} 82 | - {x: -2, y: -2} 83 | - {x: 2, y: -2} 84 | physicsShape: 85 | - - {x: 0, y: 2} 86 | - {x: -2, y: -2} 87 | - {x: 2, y: -2} 88 | - {x: 2, y: 2} 89 | bones: [] 90 | spriteID: 5e97eb03825dee720800000000000000 91 | internalID: 0 92 | vertices: [] 93 | indices: 94 | edges: [] 95 | weights: [] 96 | secondaryTextures: [] 97 | spritePackingTag: 98 | pSDRemoveMatte: 0 99 | pSDShowRemoveMatteOption: 0 100 | userData: 101 | assetBundleName: 102 | assetBundleVariant: 103 | -------------------------------------------------------------------------------- /Assets/Sprites/Low Slope End.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krthush/2d-unity-movement/e5009d699a6eb0decc9d3756ada356b9e25f7de5/Assets/Sprites/Low Slope End.png -------------------------------------------------------------------------------- /Assets/Sprites/Low Slope End.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5418f8e2139da3e428ce2362f4778e8e 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 3 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 4 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: 0 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | ignorePngGamma: 0 62 | applyGammaDecoding: 0 63 | platformSettings: 64 | - serializedVersion: 3 65 | buildTarget: DefaultTexturePlatform 66 | maxTextureSize: 2048 67 | resizeAlgorithm: 0 68 | textureFormat: 4 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | androidETC2FallbackOverride: 0 75 | forceMaximumCompressionQuality_BC6H_BC7: 0 76 | spriteSheet: 77 | serializedVersion: 2 78 | sprites: [] 79 | outline: 80 | - - {x: 2, y: 2} 81 | - {x: -2, y: 0} 82 | - {x: -2, y: -2} 83 | - {x: 2, y: -2} 84 | physicsShape: 85 | - - {x: -2, y: 0} 86 | - {x: -2, y: -2} 87 | - {x: 2, y: -2} 88 | - {x: 2, y: 2} 89 | bones: [] 90 | spriteID: 5e97eb03825dee720800000000000000 91 | internalID: 0 92 | vertices: [] 93 | indices: 94 | edges: [] 95 | weights: [] 96 | secondaryTextures: [] 97 | spritePackingTag: 98 | pSDRemoveMatte: 0 99 | pSDShowRemoveMatteOption: 0 100 | userData: 101 | assetBundleName: 102 | assetBundleVariant: 103 | -------------------------------------------------------------------------------- /Assets/Sprites/Low Slope Start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krthush/2d-unity-movement/e5009d699a6eb0decc9d3756ada356b9e25f7de5/Assets/Sprites/Low Slope Start.png -------------------------------------------------------------------------------- /Assets/Sprites/Low Slope Start.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18a235f359107d4468a951d3fbca4d86 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 3 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 4 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: 0 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | ignorePngGamma: 0 62 | applyGammaDecoding: 0 63 | platformSettings: 64 | - serializedVersion: 3 65 | buildTarget: DefaultTexturePlatform 66 | maxTextureSize: 2048 67 | resizeAlgorithm: 0 68 | textureFormat: 4 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | androidETC2FallbackOverride: 0 75 | forceMaximumCompressionQuality_BC6H_BC7: 0 76 | spriteSheet: 77 | serializedVersion: 2 78 | sprites: [] 79 | outline: 80 | - - {x: 2, y: 0} 81 | - {x: -2, y: -2} 82 | - {x: 2, y: -2} 83 | physicsShape: 84 | - - {x: -2, y: -2} 85 | - {x: 2, y: -2} 86 | - {x: 2, y: 0} 87 | bones: [] 88 | spriteID: 5e97eb03825dee720800000000000000 89 | internalID: 0 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | secondaryTextures: [] 95 | spritePackingTag: 96 | pSDRemoveMatte: 0 97 | pSDShowRemoveMatteOption: 0 98 | userData: 99 | assetBundleName: 100 | assetBundleVariant: 101 | -------------------------------------------------------------------------------- /Assets/Sprites/Slope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krthush/2d-unity-movement/e5009d699a6eb0decc9d3756ada356b9e25f7de5/Assets/Sprites/Slope.png -------------------------------------------------------------------------------- /Assets/Sprites/Slope.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e22c4903e01d66244ae87935c4b0a7b4 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 3 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 4 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: 0 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | ignorePngGamma: 0 62 | applyGammaDecoding: 0 63 | platformSettings: 64 | - serializedVersion: 3 65 | buildTarget: DefaultTexturePlatform 66 | maxTextureSize: 2048 67 | resizeAlgorithm: 0 68 | textureFormat: 4 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | androidETC2FallbackOverride: 0 75 | forceMaximumCompressionQuality_BC6H_BC7: 0 76 | spriteSheet: 77 | serializedVersion: 2 78 | sprites: [] 79 | outline: 80 | - - {x: 2, y: 2} 81 | - {x: -2, y: -2} 82 | - {x: 2, y: -2} 83 | physicsShape: 84 | - - {x: -2, y: -2} 85 | - {x: 2, y: -2} 86 | - {x: 2, y: 2} 87 | bones: [] 88 | spriteID: 5e97eb03825dee720800000000000000 89 | internalID: 0 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | secondaryTextures: [] 95 | spritePackingTag: 96 | pSDRemoveMatte: 0 97 | pSDShowRemoveMatteOption: 0 98 | userData: 99 | assetBundleName: 100 | assetBundleVariant: 101 | -------------------------------------------------------------------------------- /Assets/Sprites/Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krthush/2d-unity-movement/e5009d699a6eb0decc9d3756ada356b9e25f7de5/Assets/Sprites/Square.png -------------------------------------------------------------------------------- /Assets/Sprites/Square.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75e68fecbba9d2544958eb1ba8958d19 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 3 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 4 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | ignorePngGamma: 0 62 | applyGammaDecoding: 0 63 | platformSettings: 64 | - serializedVersion: 3 65 | buildTarget: DefaultTexturePlatform 66 | maxTextureSize: 2048 67 | resizeAlgorithm: 0 68 | textureFormat: 4 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | androidETC2FallbackOverride: 0 75 | forceMaximumCompressionQuality_BC6H_BC7: 0 76 | spriteSheet: 77 | serializedVersion: 2 78 | sprites: [] 79 | outline: 80 | - - {x: -2, y: -2} 81 | - {x: -2, y: 2} 82 | - {x: 2, y: 2} 83 | - {x: 2, y: -2} 84 | physicsShape: 85 | - - {x: -2, y: -2} 86 | - {x: -2, y: 2} 87 | - {x: 2, y: 2} 88 | - {x: 2, y: -2} 89 | bones: [] 90 | spriteID: 5e97eb03825dee720800000000000000 91 | internalID: 0 92 | vertices: [] 93 | indices: 94 | edges: [] 95 | weights: [] 96 | secondaryTextures: [] 97 | spritePackingTag: 98 | pSDRemoveMatte: 0 99 | pSDShowRemoveMatteOption: 0 100 | userData: 101 | assetBundleName: 102 | assetBundleVariant: 103 | -------------------------------------------------------------------------------- /Assets/Sprites/Tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krthush/2d-unity-movement/e5009d699a6eb0decc9d3756ada356b9e25f7de5/Assets/Sprites/Tile.png -------------------------------------------------------------------------------- /Assets/Sprites/Tile.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 674f188bd3bcfe844bcc86ced67fef4e 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 3 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 4 50 | spriteBorder: {x: 0, y: 3, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: 0 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | ignorePngGamma: 0 62 | applyGammaDecoding: 0 63 | platformSettings: 64 | - serializedVersion: 3 65 | buildTarget: DefaultTexturePlatform 66 | maxTextureSize: 2048 67 | resizeAlgorithm: 0 68 | textureFormat: 4 69 | textureCompression: 1 70 | compressionQuality: 50 71 | crunchedCompression: 0 72 | allowsAlphaSplitting: 0 73 | overridden: 0 74 | androidETC2FallbackOverride: 0 75 | forceMaximumCompressionQuality_BC6H_BC7: 0 76 | spriteSheet: 77 | serializedVersion: 2 78 | sprites: [] 79 | outline: 80 | - - {x: -2, y: 1} 81 | - {x: -2, y: 2} 82 | - {x: 2, y: 2} 83 | - {x: 2, y: 1} 84 | physicsShape: 85 | - - {x: -2, y: 1} 86 | - {x: -2, y: 2} 87 | - {x: 2, y: 2} 88 | - {x: 2, y: 1} 89 | bones: [] 90 | spriteID: 5e97eb03825dee720800000000000000 91 | internalID: 0 92 | vertices: [] 93 | indices: 94 | edges: [] 95 | weights: [] 96 | secondaryTextures: [] 97 | spritePackingTag: 98 | pSDRemoveMatte: 0 99 | pSDShowRemoveMatteOption: 0 100 | userData: 101 | assetBundleName: 102 | assetBundleVariant: 103 | -------------------------------------------------------------------------------- /Assets/Tile Palettes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6777a45bbff97414e88449b7a935cd51 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1391a0ffe97521e44b3b8e8e8c8cad44 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/High Slope End.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: High Slope End 14 | m_EditorClassIdentifier: 15 | m_Sprite: {fileID: 21300000, guid: 78673128654a6fb43b98030d23062e13, type: 3} 16 | m_Color: {r: 1, g: 1, b: 1, a: 1} 17 | m_Transform: 18 | e00: 1 19 | e01: 0 20 | e02: 0 21 | e03: 0 22 | e10: 0 23 | e11: 1 24 | e12: 0 25 | e13: 0 26 | e20: 0 27 | e21: 0 28 | e22: 1 29 | e23: 0 30 | e30: 0 31 | e31: 0 32 | e32: 0 33 | e33: 1 34 | m_InstancedGameObject: {fileID: 0} 35 | m_Flags: 1 36 | m_ColliderType: 1 37 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/High Slope End.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b06e8ee6ddbc1e14e90fc55f54b55c11 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/High Slope Start.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: High Slope Start 14 | m_EditorClassIdentifier: 15 | m_Sprite: {fileID: 21300000, guid: 0c562dae8f023194e8075e4afc59c69b, type: 3} 16 | m_Color: {r: 1, g: 1, b: 1, a: 1} 17 | m_Transform: 18 | e00: 1 19 | e01: 0 20 | e02: 0 21 | e03: 0 22 | e10: 0 23 | e11: 1 24 | e12: 0 25 | e13: 0 26 | e20: 0 27 | e21: 0 28 | e22: 1 29 | e23: 0 30 | e30: 0 31 | e31: 0 32 | e32: 0 33 | e33: 1 34 | m_InstancedGameObject: {fileID: 0} 35 | m_Flags: 1 36 | m_ColliderType: 1 37 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/High Slope Start.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06a1079340fe16f43b2356bad9998280 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Low Slope End.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: Low Slope End 14 | m_EditorClassIdentifier: 15 | m_Sprite: {fileID: 21300000, guid: 5418f8e2139da3e428ce2362f4778e8e, type: 3} 16 | m_Color: {r: 1, g: 1, b: 1, a: 1} 17 | m_Transform: 18 | e00: 1 19 | e01: 0 20 | e02: 0 21 | e03: 0 22 | e10: 0 23 | e11: 1 24 | e12: 0 25 | e13: 0 26 | e20: 0 27 | e21: 0 28 | e22: 1 29 | e23: 0 30 | e30: 0 31 | e31: 0 32 | e32: 0 33 | e33: 1 34 | m_InstancedGameObject: {fileID: 0} 35 | m_Flags: 1 36 | m_ColliderType: 1 37 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Low Slope End.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a5217d1a91962a4bbff85ebae598bee 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Low Slope Start.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: Low Slope Start 14 | m_EditorClassIdentifier: 15 | m_Sprite: {fileID: 21300000, guid: 18a235f359107d4468a951d3fbca4d86, type: 3} 16 | m_Color: {r: 1, g: 1, b: 1, a: 1} 17 | m_Transform: 18 | e00: 1 19 | e01: 0 20 | e02: 0 21 | e03: 0 22 | e10: 0 23 | e11: 1 24 | e12: 0 25 | e13: 0 26 | e20: 0 27 | e21: 0 28 | e22: 1 29 | e23: 0 30 | e30: 0 31 | e31: 0 32 | e32: 0 33 | e33: 1 34 | m_InstancedGameObject: {fileID: 0} 35 | m_Flags: 1 36 | m_ColliderType: 1 37 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Low Slope Start.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02b1595d21210124ab54eb882901729c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Slope.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: Slope 14 | m_EditorClassIdentifier: 15 | m_Sprite: {fileID: 21300000, guid: e22c4903e01d66244ae87935c4b0a7b4, type: 3} 16 | m_Color: {r: 1, g: 1, b: 1, a: 1} 17 | m_Transform: 18 | e00: 1 19 | e01: 0 20 | e02: 0 21 | e03: 0 22 | e10: 0 23 | e11: 1 24 | e12: 0 25 | e13: 0 26 | e20: 0 27 | e21: 0 28 | e22: 1 29 | e23: 0 30 | e30: 0 31 | e31: 0 32 | e32: 0 33 | e33: 1 34 | m_InstancedGameObject: {fileID: 0} 35 | m_Flags: 1 36 | m_ColliderType: 1 37 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Slope.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9a62177d584a1f4197d448a6753f40c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Square.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: Square 14 | m_EditorClassIdentifier: 15 | m_Sprite: {fileID: 21300000, guid: 75e68fecbba9d2544958eb1ba8958d19, type: 3} 16 | m_Color: {r: 1, g: 1, b: 1, a: 1} 17 | m_Transform: 18 | e00: 1 19 | e01: 0 20 | e02: 0 21 | e03: 0 22 | e10: 0 23 | e11: 1 24 | e12: 0 25 | e13: 0 26 | e20: 0 27 | e21: 0 28 | e22: 1 29 | e23: 0 30 | e30: 0 31 | e31: 0 32 | e32: 0 33 | e33: 1 34 | m_InstancedGameObject: {fileID: 0} 35 | m_Flags: 1 36 | m_ColliderType: 1 37 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Square.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c87f285c81563144b9f14424354377a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Tile.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: Tile 14 | m_EditorClassIdentifier: 15 | m_Sprite: {fileID: 21300000, guid: 674f188bd3bcfe844bcc86ced67fef4e, type: 3} 16 | m_Color: {r: 1, g: 1, b: 1, a: 1} 17 | m_Transform: 18 | e00: 1 19 | e01: 0 20 | e02: 0 21 | e03: 0 22 | e10: 0 23 | e11: 1 24 | e12: 0 25 | e13: 0 26 | e20: 0 27 | e21: 0 28 | e22: 1 29 | e23: 0 30 | e30: 0 31 | e31: 0 32 | e32: 0 33 | e33: 1 34 | m_InstancedGameObject: {fileID: 0} 35 | m_Flags: 1 36 | m_ColliderType: 1 37 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Assets/Tile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b81c169a1f1d0445a62ef5f0d8339ef 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Prototyping.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &722172230504529265 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1185910943178848959} 12 | - component: {fileID: 1193458987234236406} 13 | m_Layer: 31 14 | m_Name: Prototyping 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1185910943178848959 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 722172230504529265} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0, y: 0, z: 0} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: 31 | - {fileID: 5873126274453111643} 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!156049354 &1193458987234236406 36 | Grid: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 722172230504529265} 42 | m_Enabled: 1 43 | m_CellSize: {x: 1, y: 1, z: 0} 44 | m_CellGap: {x: 0, y: 0, z: 0} 45 | m_CellLayout: 0 46 | m_CellSwizzle: 0 47 | --- !u!1 &1569796108100841658 48 | GameObject: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 5873126274453111643} 56 | - component: {fileID: 6924263697436553341} 57 | - component: {fileID: 6720268963096994220} 58 | m_Layer: 0 59 | m_Name: Layer1 60 | m_TagString: Untagged 61 | m_Icon: {fileID: 0} 62 | m_NavMeshLayer: 0 63 | m_StaticEditorFlags: 0 64 | m_IsActive: 1 65 | --- !u!4 &5873126274453111643 66 | Transform: 67 | m_ObjectHideFlags: 0 68 | m_CorrespondingSourceObject: {fileID: 0} 69 | m_PrefabInstance: {fileID: 0} 70 | m_PrefabAsset: {fileID: 0} 71 | m_GameObject: {fileID: 1569796108100841658} 72 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 73 | m_LocalPosition: {x: 0, y: 0, z: 0} 74 | m_LocalScale: {x: 1, y: 1, z: 1} 75 | m_Children: [] 76 | m_Father: {fileID: 1185910943178848959} 77 | m_RootOrder: 0 78 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 79 | --- !u!1839735485 &6924263697436553341 80 | Tilemap: 81 | m_ObjectHideFlags: 0 82 | m_CorrespondingSourceObject: {fileID: 0} 83 | m_PrefabInstance: {fileID: 0} 84 | m_PrefabAsset: {fileID: 0} 85 | m_GameObject: {fileID: 1569796108100841658} 86 | m_Enabled: 1 87 | m_Tiles: 88 | - first: {x: -1, y: -6, z: 0} 89 | second: 90 | serializedVersion: 2 91 | m_TileIndex: 6 92 | m_TileSpriteIndex: 6 93 | m_TileMatrixIndex: 0 94 | m_TileColorIndex: 0 95 | m_TileObjectToInstantiateIndex: 65535 96 | dummyAlignment: 0 97 | m_AllTileFlags: 1073741825 98 | - first: {x: -4, y: -4, z: 0} 99 | second: 100 | serializedVersion: 2 101 | m_TileIndex: 5 102 | m_TileSpriteIndex: 5 103 | m_TileMatrixIndex: 4 104 | m_TileColorIndex: 0 105 | m_TileObjectToInstantiateIndex: 65535 106 | dummyAlignment: 0 107 | m_AllTileFlags: 1073741825 108 | - first: {x: -2, y: -4, z: 0} 109 | second: 110 | serializedVersion: 2 111 | m_TileIndex: 4 112 | m_TileSpriteIndex: 4 113 | m_TileMatrixIndex: 0 114 | m_TileColorIndex: 0 115 | m_TileObjectToInstantiateIndex: 65535 116 | dummyAlignment: 0 117 | m_AllTileFlags: 1073741825 118 | - first: {x: 0, y: -4, z: 0} 119 | second: 120 | serializedVersion: 2 121 | m_TileIndex: 4 122 | m_TileSpriteIndex: 4 123 | m_TileMatrixIndex: 2 124 | m_TileColorIndex: 0 125 | m_TileObjectToInstantiateIndex: 65535 126 | dummyAlignment: 0 127 | m_AllTileFlags: 1073741825 128 | - first: {x: 2, y: -4, z: 0} 129 | second: 130 | serializedVersion: 2 131 | m_TileIndex: 5 132 | m_TileSpriteIndex: 5 133 | m_TileMatrixIndex: 3 134 | m_TileColorIndex: 0 135 | m_TileObjectToInstantiateIndex: 65535 136 | dummyAlignment: 0 137 | m_AllTileFlags: 1073741825 138 | - first: {x: -4, y: -3, z: 0} 139 | second: 140 | serializedVersion: 2 141 | m_TileIndex: 4 142 | m_TileSpriteIndex: 4 143 | m_TileMatrixIndex: 4 144 | m_TileColorIndex: 0 145 | m_TileObjectToInstantiateIndex: 65535 146 | dummyAlignment: 0 147 | m_AllTileFlags: 1073741825 148 | - first: {x: -2, y: -3, z: 0} 149 | second: 150 | serializedVersion: 2 151 | m_TileIndex: 5 152 | m_TileSpriteIndex: 5 153 | m_TileMatrixIndex: 0 154 | m_TileColorIndex: 0 155 | m_TileObjectToInstantiateIndex: 65535 156 | dummyAlignment: 0 157 | m_AllTileFlags: 1073741825 158 | - first: {x: 0, y: -3, z: 0} 159 | second: 160 | serializedVersion: 2 161 | m_TileIndex: 5 162 | m_TileSpriteIndex: 5 163 | m_TileMatrixIndex: 2 164 | m_TileColorIndex: 0 165 | m_TileObjectToInstantiateIndex: 65535 166 | dummyAlignment: 0 167 | m_AllTileFlags: 1073741825 168 | - first: {x: 2, y: -3, z: 0} 169 | second: 170 | serializedVersion: 2 171 | m_TileIndex: 4 172 | m_TileSpriteIndex: 4 173 | m_TileMatrixIndex: 3 174 | m_TileColorIndex: 0 175 | m_TileObjectToInstantiateIndex: 65535 176 | dummyAlignment: 0 177 | m_AllTileFlags: 1073741825 178 | - first: {x: -5, y: -1, z: 0} 179 | second: 180 | serializedVersion: 2 181 | m_TileIndex: 1 182 | m_TileSpriteIndex: 1 183 | m_TileMatrixIndex: 4 184 | m_TileColorIndex: 0 185 | m_TileObjectToInstantiateIndex: 65535 186 | dummyAlignment: 0 187 | m_AllTileFlags: 1073741825 188 | - first: {x: -3, y: -1, z: 0} 189 | second: 190 | serializedVersion: 2 191 | m_TileIndex: 1 192 | m_TileSpriteIndex: 1 193 | m_TileMatrixIndex: 0 194 | m_TileColorIndex: 0 195 | m_TileObjectToInstantiateIndex: 65535 196 | dummyAlignment: 0 197 | m_AllTileFlags: 1073741825 198 | - first: {x: -1, y: -1, z: 0} 199 | second: 200 | serializedVersion: 2 201 | m_TileIndex: 0 202 | m_TileSpriteIndex: 0 203 | m_TileMatrixIndex: 0 204 | m_TileColorIndex: 0 205 | m_TileObjectToInstantiateIndex: 65535 206 | dummyAlignment: 0 207 | m_AllTileFlags: 1073741825 208 | - first: {x: 1, y: -1, z: 0} 209 | second: 210 | serializedVersion: 2 211 | m_TileIndex: 1 212 | m_TileSpriteIndex: 1 213 | m_TileMatrixIndex: 1 214 | m_TileColorIndex: 0 215 | m_TileObjectToInstantiateIndex: 65535 216 | dummyAlignment: 0 217 | m_AllTileFlags: 1073741825 218 | - first: {x: 3, y: -1, z: 0} 219 | second: 220 | serializedVersion: 2 221 | m_TileIndex: 1 222 | m_TileSpriteIndex: 1 223 | m_TileMatrixIndex: 3 224 | m_TileColorIndex: 0 225 | m_TileObjectToInstantiateIndex: 65535 226 | dummyAlignment: 0 227 | m_AllTileFlags: 1073741825 228 | - first: {x: -6, y: 1, z: 0} 229 | second: 230 | serializedVersion: 2 231 | m_TileIndex: 3 232 | m_TileSpriteIndex: 3 233 | m_TileMatrixIndex: 4 234 | m_TileColorIndex: 0 235 | m_TileObjectToInstantiateIndex: 65535 236 | dummyAlignment: 0 237 | m_AllTileFlags: 1073741825 238 | - first: {x: -5, y: 1, z: 0} 239 | second: 240 | serializedVersion: 2 241 | m_TileIndex: 2 242 | m_TileSpriteIndex: 2 243 | m_TileMatrixIndex: 4 244 | m_TileColorIndex: 0 245 | m_TileObjectToInstantiateIndex: 65535 246 | dummyAlignment: 0 247 | m_AllTileFlags: 1073741825 248 | - first: {x: -3, y: 1, z: 0} 249 | second: 250 | serializedVersion: 2 251 | m_TileIndex: 2 252 | m_TileSpriteIndex: 2 253 | m_TileMatrixIndex: 0 254 | m_TileColorIndex: 0 255 | m_TileObjectToInstantiateIndex: 65535 256 | dummyAlignment: 0 257 | m_AllTileFlags: 1073741825 258 | - first: {x: -2, y: 1, z: 0} 259 | second: 260 | serializedVersion: 2 261 | m_TileIndex: 3 262 | m_TileSpriteIndex: 3 263 | m_TileMatrixIndex: 0 264 | m_TileColorIndex: 0 265 | m_TileObjectToInstantiateIndex: 65535 266 | dummyAlignment: 0 267 | m_AllTileFlags: 1073741825 268 | - first: {x: 0, y: 1, z: 0} 269 | second: 270 | serializedVersion: 2 271 | m_TileIndex: 3 272 | m_TileSpriteIndex: 3 273 | m_TileMatrixIndex: 2 274 | m_TileColorIndex: 0 275 | m_TileObjectToInstantiateIndex: 65535 276 | dummyAlignment: 0 277 | m_AllTileFlags: 1073741825 278 | - first: {x: 1, y: 1, z: 0} 279 | second: 280 | serializedVersion: 2 281 | m_TileIndex: 2 282 | m_TileSpriteIndex: 2 283 | m_TileMatrixIndex: 2 284 | m_TileColorIndex: 0 285 | m_TileObjectToInstantiateIndex: 65535 286 | dummyAlignment: 0 287 | m_AllTileFlags: 1073741825 288 | - first: {x: 3, y: 1, z: 0} 289 | second: 290 | serializedVersion: 2 291 | m_TileIndex: 2 292 | m_TileSpriteIndex: 2 293 | m_TileMatrixIndex: 3 294 | m_TileColorIndex: 0 295 | m_TileObjectToInstantiateIndex: 65535 296 | dummyAlignment: 0 297 | m_AllTileFlags: 1073741825 298 | - first: {x: 4, y: 1, z: 0} 299 | second: 300 | serializedVersion: 2 301 | m_TileIndex: 3 302 | m_TileSpriteIndex: 3 303 | m_TileMatrixIndex: 3 304 | m_TileColorIndex: 0 305 | m_TileObjectToInstantiateIndex: 65535 306 | dummyAlignment: 0 307 | m_AllTileFlags: 1073741825 308 | m_AnimatedTiles: {} 309 | m_TileAssetArray: 310 | - m_RefCount: 1 311 | m_Data: {fileID: 11400000, guid: 7c87f285c81563144b9f14424354377a, type: 2} 312 | - m_RefCount: 4 313 | m_Data: {fileID: 11400000, guid: c9a62177d584a1f4197d448a6753f40c, type: 2} 314 | - m_RefCount: 4 315 | m_Data: {fileID: 11400000, guid: 02b1595d21210124ab54eb882901729c, type: 2} 316 | - m_RefCount: 4 317 | m_Data: {fileID: 11400000, guid: 8a5217d1a91962a4bbff85ebae598bee, type: 2} 318 | - m_RefCount: 4 319 | m_Data: {fileID: 11400000, guid: 06a1079340fe16f43b2356bad9998280, type: 2} 320 | - m_RefCount: 4 321 | m_Data: {fileID: 11400000, guid: b06e8ee6ddbc1e14e90fc55f54b55c11, type: 2} 322 | - m_RefCount: 1 323 | m_Data: {fileID: 11400000, guid: 0b81c169a1f1d0445a62ef5f0d8339ef, type: 2} 324 | m_TileSpriteArray: 325 | - m_RefCount: 1 326 | m_Data: {fileID: 21300000, guid: 75e68fecbba9d2544958eb1ba8958d19, type: 3} 327 | - m_RefCount: 4 328 | m_Data: {fileID: 21300000, guid: e22c4903e01d66244ae87935c4b0a7b4, type: 3} 329 | - m_RefCount: 4 330 | m_Data: {fileID: 21300000, guid: 18a235f359107d4468a951d3fbca4d86, type: 3} 331 | - m_RefCount: 4 332 | m_Data: {fileID: 21300000, guid: 5418f8e2139da3e428ce2362f4778e8e, type: 3} 333 | - m_RefCount: 4 334 | m_Data: {fileID: 21300000, guid: 0c562dae8f023194e8075e4afc59c69b, type: 3} 335 | - m_RefCount: 4 336 | m_Data: {fileID: 21300000, guid: 78673128654a6fb43b98030d23062e13, type: 3} 337 | - m_RefCount: 1 338 | m_Data: {fileID: 21300000, guid: 674f188bd3bcfe844bcc86ced67fef4e, type: 3} 339 | m_TileMatrixArray: 340 | - m_RefCount: 7 341 | m_Data: 342 | e00: 1 343 | e01: 0 344 | e02: 0 345 | e03: 0 346 | e10: 0 347 | e11: 1 348 | e12: 0 349 | e13: 0 350 | e20: 0 351 | e21: 0 352 | e22: 1 353 | e23: 0 354 | e30: 0 355 | e31: 0 356 | e32: 0 357 | e33: 1 358 | - m_RefCount: 1 359 | m_Data: 360 | e00: 0 361 | e01: 1 362 | e02: 0 363 | e03: 0 364 | e10: -1 365 | e11: 0 366 | e12: 0 367 | e13: 0 368 | e20: 0 369 | e21: 0 370 | e22: 1 371 | e23: 0 372 | e30: 0 373 | e31: 0 374 | e32: 0 375 | e33: 1 376 | - m_RefCount: 4 377 | m_Data: 378 | e00: -1 379 | e01: 0 380 | e02: 0 381 | e03: 0 382 | e10: 0 383 | e11: 1 384 | e12: 0 385 | e13: 0 386 | e20: 0 387 | e21: 0 388 | e22: 1 389 | e23: 0 390 | e30: 0 391 | e31: 0 392 | e32: 0 393 | e33: 1 394 | - m_RefCount: 5 395 | m_Data: 396 | e00: 1 397 | e01: 0 398 | e02: 0 399 | e03: 0 400 | e10: 0 401 | e11: -1 402 | e12: 0 403 | e13: 0 404 | e20: 0 405 | e21: 0 406 | e22: 1 407 | e23: 0 408 | e30: 0 409 | e31: 0 410 | e32: 0 411 | e33: 1 412 | - m_RefCount: 5 413 | m_Data: 414 | e00: -1 415 | e01: 0 416 | e02: 0 417 | e03: 0 418 | e10: 0 419 | e11: -1 420 | e12: 0 421 | e13: 0 422 | e20: 0 423 | e21: 0 424 | e22: 1 425 | e23: 0 426 | e30: 0 427 | e31: 0 428 | e32: 0 429 | e33: 1 430 | m_TileColorArray: 431 | - m_RefCount: 22 432 | m_Data: {r: 1, g: 1, b: 1, a: 1} 433 | m_TileObjectToInstantiateArray: [] 434 | m_AnimationFrameRate: 1 435 | m_Color: {r: 1, g: 1, b: 1, a: 1} 436 | m_Origin: {x: -6, y: -6, z: 0} 437 | m_Size: {x: 11, y: 8, z: 1} 438 | m_TileAnchor: {x: 0.5, y: 0.5, z: 0} 439 | m_TileOrientation: 0 440 | m_TileOrientationMatrix: 441 | e00: 1 442 | e01: 0 443 | e02: 0 444 | e03: 0 445 | e10: 0 446 | e11: 1 447 | e12: 0 448 | e13: 0 449 | e20: 0 450 | e21: 0 451 | e22: 1 452 | e23: 0 453 | e30: 0 454 | e31: 0 455 | e32: 0 456 | e33: 1 457 | --- !u!483693784 &6720268963096994220 458 | TilemapRenderer: 459 | m_ObjectHideFlags: 0 460 | m_CorrespondingSourceObject: {fileID: 0} 461 | m_PrefabInstance: {fileID: 0} 462 | m_PrefabAsset: {fileID: 0} 463 | m_GameObject: {fileID: 1569796108100841658} 464 | m_Enabled: 1 465 | m_CastShadows: 0 466 | m_ReceiveShadows: 0 467 | m_DynamicOccludee: 0 468 | m_MotionVectors: 1 469 | m_LightProbeUsage: 0 470 | m_ReflectionProbeUsage: 0 471 | m_RayTracingMode: 0 472 | m_RayTraceProcedural: 0 473 | m_RenderingLayerMask: 1 474 | m_RendererPriority: 0 475 | m_Materials: 476 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 477 | m_StaticBatchInfo: 478 | firstSubMesh: 0 479 | subMeshCount: 0 480 | m_StaticBatchRoot: {fileID: 0} 481 | m_ProbeAnchor: {fileID: 0} 482 | m_LightProbeVolumeOverride: {fileID: 0} 483 | m_ScaleInLightmap: 1 484 | m_ReceiveGI: 1 485 | m_PreserveUVs: 0 486 | m_IgnoreNormalsForChartDetection: 0 487 | m_ImportantGI: 0 488 | m_StitchLightmapSeams: 1 489 | m_SelectedEditorRenderState: 0 490 | m_MinimumChartSize: 4 491 | m_AutoUVMaxDistance: 0.5 492 | m_AutoUVMaxAngle: 89 493 | m_LightmapParameters: {fileID: 0} 494 | m_SortingLayerID: 0 495 | m_SortingLayer: 0 496 | m_SortingOrder: 0 497 | m_ChunkSize: {x: 32, y: 32, z: 32} 498 | m_ChunkCullingBounds: {x: 0, y: 0, z: 0} 499 | m_MaxChunkCount: 16 500 | m_MaxFrameAge: 16 501 | m_SortOrder: 0 502 | m_Mode: 0 503 | m_DetectChunkCullingBounds: 0 504 | m_MaskInteraction: 0 505 | --- !u!114 &7758356763464397343 506 | MonoBehaviour: 507 | m_ObjectHideFlags: 0 508 | m_CorrespondingSourceObject: {fileID: 0} 509 | m_PrefabInstance: {fileID: 0} 510 | m_PrefabAsset: {fileID: 0} 511 | m_GameObject: {fileID: 0} 512 | m_Enabled: 1 513 | m_EditorHideFlags: 0 514 | m_Script: {fileID: 12395, guid: 0000000000000000e000000000000000, type: 0} 515 | m_Name: Palette Settings 516 | m_EditorClassIdentifier: 517 | cellSizing: 0 518 | -------------------------------------------------------------------------------- /Assets/Tile Palettes/Prototyping.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 600174462e9550a49ada338fe74fc476 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Thushaan Rajaratnam 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.animation": "4.2.6", 4 | "com.unity.2d.pixel-perfect": "3.0.2", 5 | "com.unity.2d.psdimporter": "3.1.6", 6 | "com.unity.2d.sprite": "1.0.0", 7 | "com.unity.2d.spriteshape": "4.1.4", 8 | "com.unity.2d.tilemap": "1.0.0", 9 | "com.unity.cinemachine": "2.6.3", 10 | "com.unity.collab-proxy": "1.3.9", 11 | "com.unity.ide.rider": "1.2.1", 12 | "com.unity.ide.visualstudio": "2.0.3", 13 | "com.unity.ide.vscode": "1.2.3", 14 | "com.unity.test-framework": "1.1.18", 15 | "com.unity.textmeshpro": "3.0.1", 16 | "com.unity.timeline": "1.3.6", 17 | "com.unity.ugui": "1.0.0", 18 | "com.unity.modules.ai": "1.0.0", 19 | "com.unity.modules.androidjni": "1.0.0", 20 | "com.unity.modules.animation": "1.0.0", 21 | "com.unity.modules.assetbundle": "1.0.0", 22 | "com.unity.modules.audio": "1.0.0", 23 | "com.unity.modules.cloth": "1.0.0", 24 | "com.unity.modules.director": "1.0.0", 25 | "com.unity.modules.imageconversion": "1.0.0", 26 | "com.unity.modules.imgui": "1.0.0", 27 | "com.unity.modules.jsonserialize": "1.0.0", 28 | "com.unity.modules.particlesystem": "1.0.0", 29 | "com.unity.modules.physics": "1.0.0", 30 | "com.unity.modules.physics2d": "1.0.0", 31 | "com.unity.modules.screencapture": "1.0.0", 32 | "com.unity.modules.terrain": "1.0.0", 33 | "com.unity.modules.terrainphysics": "1.0.0", 34 | "com.unity.modules.tilemap": "1.0.0", 35 | "com.unity.modules.ui": "1.0.0", 36 | "com.unity.modules.uielements": "1.0.0", 37 | "com.unity.modules.umbra": "1.0.0", 38 | "com.unity.modules.unityanalytics": "1.0.0", 39 | "com.unity.modules.unitywebrequest": "1.0.0", 40 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 41 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 42 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 43 | "com.unity.modules.unitywebrequestwww": "1.0.0", 44 | "com.unity.modules.vehicles": "1.0.0", 45 | "com.unity.modules.video": "1.0.0", 46 | "com.unity.modules.vr": "1.0.0", 47 | "com.unity.modules.wind": "1.0.0", 48 | "com.unity.modules.xr": "1.0.0" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.animation": { 4 | "version": "4.2.6", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.2d.common": "3.0.1", 9 | "com.unity.mathematics": "1.1.0", 10 | "com.unity.2d.sprite": "1.0.0", 11 | "com.unity.modules.animation": "1.0.0", 12 | "com.unity.modules.uielements": "1.0.0" 13 | }, 14 | "url": "https://packages.unity.com" 15 | }, 16 | "com.unity.2d.common": { 17 | "version": "3.0.1", 18 | "depth": 1, 19 | "source": "registry", 20 | "dependencies": { 21 | "com.unity.2d.sprite": "1.0.0", 22 | "com.unity.modules.uielements": "1.0.0" 23 | }, 24 | "url": "https://packages.unity.com" 25 | }, 26 | "com.unity.2d.path": { 27 | "version": "3.0.2", 28 | "depth": 1, 29 | "source": "registry", 30 | "dependencies": {}, 31 | "url": "https://packages.unity.com" 32 | }, 33 | "com.unity.2d.pixel-perfect": { 34 | "version": "3.0.2", 35 | "depth": 0, 36 | "source": "registry", 37 | "dependencies": {}, 38 | "url": "https://packages.unity.com" 39 | }, 40 | "com.unity.2d.psdimporter": { 41 | "version": "3.1.6", 42 | "depth": 0, 43 | "source": "registry", 44 | "dependencies": { 45 | "com.unity.2d.common": "3.0.1", 46 | "com.unity.2d.animation": "4.2.6", 47 | "com.unity.2d.sprite": "1.0.0" 48 | }, 49 | "url": "https://packages.unity.com" 50 | }, 51 | "com.unity.2d.sprite": { 52 | "version": "1.0.0", 53 | "depth": 0, 54 | "source": "builtin", 55 | "dependencies": {} 56 | }, 57 | "com.unity.2d.spriteshape": { 58 | "version": "4.1.4", 59 | "depth": 0, 60 | "source": "registry", 61 | "dependencies": { 62 | "com.unity.mathematics": "1.1.0", 63 | "com.unity.2d.common": "3.0.1", 64 | "com.unity.2d.path": "3.0.2", 65 | "com.unity.modules.physics2d": "1.0.0" 66 | }, 67 | "url": "https://packages.unity.com" 68 | }, 69 | "com.unity.2d.tilemap": { 70 | "version": "1.0.0", 71 | "depth": 0, 72 | "source": "builtin", 73 | "dependencies": {} 74 | }, 75 | "com.unity.cinemachine": { 76 | "version": "2.6.3", 77 | "depth": 0, 78 | "source": "registry", 79 | "dependencies": {}, 80 | "url": "https://packages.unity.com" 81 | }, 82 | "com.unity.collab-proxy": { 83 | "version": "1.3.9", 84 | "depth": 0, 85 | "source": "registry", 86 | "dependencies": {}, 87 | "url": "https://packages.unity.com" 88 | }, 89 | "com.unity.ext.nunit": { 90 | "version": "1.0.0", 91 | "depth": 1, 92 | "source": "registry", 93 | "dependencies": {}, 94 | "url": "https://packages.unity.com" 95 | }, 96 | "com.unity.ide.rider": { 97 | "version": "1.2.1", 98 | "depth": 0, 99 | "source": "registry", 100 | "dependencies": { 101 | "com.unity.test-framework": "1.1.1" 102 | }, 103 | "url": "https://packages.unity.com" 104 | }, 105 | "com.unity.ide.visualstudio": { 106 | "version": "2.0.3", 107 | "depth": 0, 108 | "source": "registry", 109 | "dependencies": {}, 110 | "url": "https://packages.unity.com" 111 | }, 112 | "com.unity.ide.vscode": { 113 | "version": "1.2.3", 114 | "depth": 0, 115 | "source": "registry", 116 | "dependencies": {}, 117 | "url": "https://packages.unity.com" 118 | }, 119 | "com.unity.mathematics": { 120 | "version": "1.1.0", 121 | "depth": 1, 122 | "source": "registry", 123 | "dependencies": {}, 124 | "url": "https://packages.unity.com" 125 | }, 126 | "com.unity.test-framework": { 127 | "version": "1.1.18", 128 | "depth": 0, 129 | "source": "registry", 130 | "dependencies": { 131 | "com.unity.ext.nunit": "1.0.0", 132 | "com.unity.modules.imgui": "1.0.0", 133 | "com.unity.modules.jsonserialize": "1.0.0" 134 | }, 135 | "url": "https://packages.unity.com" 136 | }, 137 | "com.unity.textmeshpro": { 138 | "version": "3.0.1", 139 | "depth": 0, 140 | "source": "registry", 141 | "dependencies": { 142 | "com.unity.ugui": "1.0.0" 143 | }, 144 | "url": "https://packages.unity.com" 145 | }, 146 | "com.unity.timeline": { 147 | "version": "1.3.6", 148 | "depth": 0, 149 | "source": "registry", 150 | "dependencies": {}, 151 | "url": "https://packages.unity.com" 152 | }, 153 | "com.unity.ugui": { 154 | "version": "1.0.0", 155 | "depth": 0, 156 | "source": "builtin", 157 | "dependencies": { 158 | "com.unity.modules.ui": "1.0.0", 159 | "com.unity.modules.imgui": "1.0.0" 160 | } 161 | }, 162 | "com.unity.modules.ai": { 163 | "version": "1.0.0", 164 | "depth": 0, 165 | "source": "builtin", 166 | "dependencies": {} 167 | }, 168 | "com.unity.modules.androidjni": { 169 | "version": "1.0.0", 170 | "depth": 0, 171 | "source": "builtin", 172 | "dependencies": {} 173 | }, 174 | "com.unity.modules.animation": { 175 | "version": "1.0.0", 176 | "depth": 0, 177 | "source": "builtin", 178 | "dependencies": {} 179 | }, 180 | "com.unity.modules.assetbundle": { 181 | "version": "1.0.0", 182 | "depth": 0, 183 | "source": "builtin", 184 | "dependencies": {} 185 | }, 186 | "com.unity.modules.audio": { 187 | "version": "1.0.0", 188 | "depth": 0, 189 | "source": "builtin", 190 | "dependencies": {} 191 | }, 192 | "com.unity.modules.cloth": { 193 | "version": "1.0.0", 194 | "depth": 0, 195 | "source": "builtin", 196 | "dependencies": { 197 | "com.unity.modules.physics": "1.0.0" 198 | } 199 | }, 200 | "com.unity.modules.director": { 201 | "version": "1.0.0", 202 | "depth": 0, 203 | "source": "builtin", 204 | "dependencies": { 205 | "com.unity.modules.audio": "1.0.0", 206 | "com.unity.modules.animation": "1.0.0" 207 | } 208 | }, 209 | "com.unity.modules.imageconversion": { 210 | "version": "1.0.0", 211 | "depth": 0, 212 | "source": "builtin", 213 | "dependencies": {} 214 | }, 215 | "com.unity.modules.imgui": { 216 | "version": "1.0.0", 217 | "depth": 0, 218 | "source": "builtin", 219 | "dependencies": {} 220 | }, 221 | "com.unity.modules.jsonserialize": { 222 | "version": "1.0.0", 223 | "depth": 0, 224 | "source": "builtin", 225 | "dependencies": {} 226 | }, 227 | "com.unity.modules.particlesystem": { 228 | "version": "1.0.0", 229 | "depth": 0, 230 | "source": "builtin", 231 | "dependencies": {} 232 | }, 233 | "com.unity.modules.physics": { 234 | "version": "1.0.0", 235 | "depth": 0, 236 | "source": "builtin", 237 | "dependencies": {} 238 | }, 239 | "com.unity.modules.physics2d": { 240 | "version": "1.0.0", 241 | "depth": 0, 242 | "source": "builtin", 243 | "dependencies": {} 244 | }, 245 | "com.unity.modules.screencapture": { 246 | "version": "1.0.0", 247 | "depth": 0, 248 | "source": "builtin", 249 | "dependencies": { 250 | "com.unity.modules.imageconversion": "1.0.0" 251 | } 252 | }, 253 | "com.unity.modules.subsystems": { 254 | "version": "1.0.0", 255 | "depth": 1, 256 | "source": "builtin", 257 | "dependencies": { 258 | "com.unity.modules.jsonserialize": "1.0.0" 259 | } 260 | }, 261 | "com.unity.modules.terrain": { 262 | "version": "1.0.0", 263 | "depth": 0, 264 | "source": "builtin", 265 | "dependencies": {} 266 | }, 267 | "com.unity.modules.terrainphysics": { 268 | "version": "1.0.0", 269 | "depth": 0, 270 | "source": "builtin", 271 | "dependencies": { 272 | "com.unity.modules.physics": "1.0.0", 273 | "com.unity.modules.terrain": "1.0.0" 274 | } 275 | }, 276 | "com.unity.modules.tilemap": { 277 | "version": "1.0.0", 278 | "depth": 0, 279 | "source": "builtin", 280 | "dependencies": { 281 | "com.unity.modules.physics2d": "1.0.0" 282 | } 283 | }, 284 | "com.unity.modules.ui": { 285 | "version": "1.0.0", 286 | "depth": 0, 287 | "source": "builtin", 288 | "dependencies": {} 289 | }, 290 | "com.unity.modules.uielements": { 291 | "version": "1.0.0", 292 | "depth": 0, 293 | "source": "builtin", 294 | "dependencies": { 295 | "com.unity.modules.ui": "1.0.0", 296 | "com.unity.modules.imgui": "1.0.0", 297 | "com.unity.modules.jsonserialize": "1.0.0", 298 | "com.unity.modules.uielementsnative": "1.0.0" 299 | } 300 | }, 301 | "com.unity.modules.uielementsnative": { 302 | "version": "1.0.0", 303 | "depth": 1, 304 | "source": "builtin", 305 | "dependencies": { 306 | "com.unity.modules.ui": "1.0.0", 307 | "com.unity.modules.imgui": "1.0.0", 308 | "com.unity.modules.jsonserialize": "1.0.0" 309 | } 310 | }, 311 | "com.unity.modules.umbra": { 312 | "version": "1.0.0", 313 | "depth": 0, 314 | "source": "builtin", 315 | "dependencies": {} 316 | }, 317 | "com.unity.modules.unityanalytics": { 318 | "version": "1.0.0", 319 | "depth": 0, 320 | "source": "builtin", 321 | "dependencies": { 322 | "com.unity.modules.unitywebrequest": "1.0.0", 323 | "com.unity.modules.jsonserialize": "1.0.0" 324 | } 325 | }, 326 | "com.unity.modules.unitywebrequest": { 327 | "version": "1.0.0", 328 | "depth": 0, 329 | "source": "builtin", 330 | "dependencies": {} 331 | }, 332 | "com.unity.modules.unitywebrequestassetbundle": { 333 | "version": "1.0.0", 334 | "depth": 0, 335 | "source": "builtin", 336 | "dependencies": { 337 | "com.unity.modules.assetbundle": "1.0.0", 338 | "com.unity.modules.unitywebrequest": "1.0.0" 339 | } 340 | }, 341 | "com.unity.modules.unitywebrequestaudio": { 342 | "version": "1.0.0", 343 | "depth": 0, 344 | "source": "builtin", 345 | "dependencies": { 346 | "com.unity.modules.unitywebrequest": "1.0.0", 347 | "com.unity.modules.audio": "1.0.0" 348 | } 349 | }, 350 | "com.unity.modules.unitywebrequesttexture": { 351 | "version": "1.0.0", 352 | "depth": 0, 353 | "source": "builtin", 354 | "dependencies": { 355 | "com.unity.modules.unitywebrequest": "1.0.0", 356 | "com.unity.modules.imageconversion": "1.0.0" 357 | } 358 | }, 359 | "com.unity.modules.unitywebrequestwww": { 360 | "version": "1.0.0", 361 | "depth": 0, 362 | "source": "builtin", 363 | "dependencies": { 364 | "com.unity.modules.unitywebrequest": "1.0.0", 365 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 366 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 367 | "com.unity.modules.audio": "1.0.0", 368 | "com.unity.modules.assetbundle": "1.0.0", 369 | "com.unity.modules.imageconversion": "1.0.0" 370 | } 371 | }, 372 | "com.unity.modules.vehicles": { 373 | "version": "1.0.0", 374 | "depth": 0, 375 | "source": "builtin", 376 | "dependencies": { 377 | "com.unity.modules.physics": "1.0.0" 378 | } 379 | }, 380 | "com.unity.modules.video": { 381 | "version": "1.0.0", 382 | "depth": 0, 383 | "source": "builtin", 384 | "dependencies": { 385 | "com.unity.modules.audio": "1.0.0", 386 | "com.unity.modules.ui": "1.0.0", 387 | "com.unity.modules.unitywebrequest": "1.0.0" 388 | } 389 | }, 390 | "com.unity.modules.vr": { 391 | "version": "1.0.0", 392 | "depth": 0, 393 | "source": "builtin", 394 | "dependencies": { 395 | "com.unity.modules.jsonserialize": "1.0.0", 396 | "com.unity.modules.physics": "1.0.0", 397 | "com.unity.modules.xr": "1.0.0" 398 | } 399 | }, 400 | "com.unity.modules.wind": { 401 | "version": "1.0.0", 402 | "depth": 0, 403 | "source": "builtin", 404 | "dependencies": {} 405 | }, 406 | "com.unity.modules.xr": { 407 | "version": "1.0.0", 408 | "depth": 0, 409 | "source": "builtin", 410 | "dependencies": { 411 | "com.unity.modules.physics": "1.0.0", 412 | "com.unity.modules.jsonserialize": "1.0.0", 413 | "com.unity.modules.subsystems": "1.0.0" 414 | } 415 | } 416 | } 417 | } 418 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/Main.unity 10 | guid: 2cda990e2423bbf4892e6590ba056729 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 10 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 1 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 4 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | m_AssetPipelineMode: 1 32 | m_CacheServerMode: 0 33 | m_CacheServerEndpoint: 34 | m_CacheServerNamespacePrefix: default 35 | m_CacheServerEnableDownload: 1 36 | m_CacheServerEnableUpload: 1 37 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | m_LogWhenShaderIsCompiled: 0 64 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | - serializedVersion: 3 297 | m_Name: Enable Debug Button 1 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: left ctrl 302 | altNegativeButton: 303 | altPositiveButton: joystick button 8 304 | gravity: 0 305 | dead: 0 306 | sensitivity: 0 307 | snap: 0 308 | invert: 0 309 | type: 0 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Enable Debug Button 2 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: backspace 318 | altNegativeButton: 319 | altPositiveButton: joystick button 9 320 | gravity: 0 321 | dead: 0 322 | sensitivity: 0 323 | snap: 0 324 | invert: 0 325 | type: 0 326 | axis: 0 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: Debug Reset 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: 333 | positiveButton: left alt 334 | altNegativeButton: 335 | altPositiveButton: joystick button 1 336 | gravity: 0 337 | dead: 0 338 | sensitivity: 0 339 | snap: 0 340 | invert: 0 341 | type: 0 342 | axis: 0 343 | joyNum: 0 344 | - serializedVersion: 3 345 | m_Name: Debug Next 346 | descriptiveName: 347 | descriptiveNegativeName: 348 | negativeButton: 349 | positiveButton: page down 350 | altNegativeButton: 351 | altPositiveButton: joystick button 5 352 | gravity: 0 353 | dead: 0 354 | sensitivity: 0 355 | snap: 0 356 | invert: 0 357 | type: 0 358 | axis: 0 359 | joyNum: 0 360 | - serializedVersion: 3 361 | m_Name: Debug Previous 362 | descriptiveName: 363 | descriptiveNegativeName: 364 | negativeButton: 365 | positiveButton: page up 366 | altNegativeButton: 367 | altPositiveButton: joystick button 4 368 | gravity: 0 369 | dead: 0 370 | sensitivity: 0 371 | snap: 0 372 | invert: 0 373 | type: 0 374 | axis: 0 375 | joyNum: 0 376 | - serializedVersion: 3 377 | m_Name: Debug Validate 378 | descriptiveName: 379 | descriptiveNegativeName: 380 | negativeButton: 381 | positiveButton: return 382 | altNegativeButton: 383 | altPositiveButton: joystick button 0 384 | gravity: 0 385 | dead: 0 386 | sensitivity: 0 387 | snap: 0 388 | invert: 0 389 | type: 0 390 | axis: 0 391 | joyNum: 0 392 | - serializedVersion: 3 393 | m_Name: Debug Persistent 394 | descriptiveName: 395 | descriptiveNegativeName: 396 | negativeButton: 397 | positiveButton: right shift 398 | altNegativeButton: 399 | altPositiveButton: joystick button 2 400 | gravity: 0 401 | dead: 0 402 | sensitivity: 0 403 | snap: 0 404 | invert: 0 405 | type: 0 406 | axis: 0 407 | joyNum: 0 408 | - serializedVersion: 3 409 | m_Name: Debug Multiplier 410 | descriptiveName: 411 | descriptiveNegativeName: 412 | negativeButton: 413 | positiveButton: left shift 414 | altNegativeButton: 415 | altPositiveButton: joystick button 3 416 | gravity: 0 417 | dead: 0 418 | sensitivity: 0 419 | snap: 0 420 | invert: 0 421 | type: 0 422 | axis: 0 423 | joyNum: 0 424 | - serializedVersion: 3 425 | m_Name: Debug Horizontal 426 | descriptiveName: 427 | descriptiveNegativeName: 428 | negativeButton: left 429 | positiveButton: right 430 | altNegativeButton: 431 | altPositiveButton: 432 | gravity: 1000 433 | dead: 0.001 434 | sensitivity: 1000 435 | snap: 0 436 | invert: 0 437 | type: 0 438 | axis: 0 439 | joyNum: 0 440 | - serializedVersion: 3 441 | m_Name: Debug Vertical 442 | descriptiveName: 443 | descriptiveNegativeName: 444 | negativeButton: down 445 | positiveButton: up 446 | altNegativeButton: 447 | altPositiveButton: 448 | gravity: 1000 449 | dead: 0.001 450 | sensitivity: 1000 451 | snap: 0 452 | invert: 0 453 | type: 0 454 | axis: 0 455 | joyNum: 0 456 | - serializedVersion: 3 457 | m_Name: Debug Vertical 458 | descriptiveName: 459 | descriptiveNegativeName: 460 | negativeButton: down 461 | positiveButton: up 462 | altNegativeButton: 463 | altPositiveButton: 464 | gravity: 1000 465 | dead: 0.001 466 | sensitivity: 1000 467 | snap: 0 468 | invert: 0 469 | type: 2 470 | axis: 6 471 | joyNum: 0 472 | - serializedVersion: 3 473 | m_Name: Debug Horizontal 474 | descriptiveName: 475 | descriptiveNegativeName: 476 | negativeButton: left 477 | positiveButton: right 478 | altNegativeButton: 479 | altPositiveButton: 480 | gravity: 1000 481 | dead: 0.001 482 | sensitivity: 1000 483 | snap: 0 484 | invert: 0 485 | type: 2 486 | axis: 5 487 | joyNum: 0 488 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 1 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 20 7 | productGUID: b850f67f0f84f8b498cb5740e5ba5261 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: 2dMechanicsPlayground 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | defaultIsNativeResolution: 1 72 | macRetinaSupport: 1 73 | runInBackground: 0 74 | captureSingleScreen: 0 75 | muteOtherAudioSources: 0 76 | Prepare IOS For Recording: 0 77 | Force IOS Speakers When Recording: 0 78 | deferSystemGesturesMode: 0 79 | hideHomeButton: 0 80 | submitAnalytics: 1 81 | usePlayerLog: 1 82 | bakeCollisionMeshes: 0 83 | forceSingleInstance: 0 84 | useFlipModelSwapchain: 1 85 | resizableWindow: 0 86 | useMacAppStoreValidation: 0 87 | macAppStoreCategory: public.app-category.games 88 | gpuSkinning: 0 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | fullscreenMode: 1 97 | xboxSpeechDB: 0 98 | xboxEnableHeadOrientation: 0 99 | xboxEnableGuest: 0 100 | xboxEnablePIXSampling: 0 101 | metalFramebufferOnly: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOneEnableTypeOptimization: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 1048576 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | switchNVNMaxPublicTextureIDCount: 0 117 | switchNVNMaxPublicSamplerIDCount: 0 118 | stadiaPresentMode: 0 119 | stadiaTargetFramerate: 0 120 | vulkanNumSwapchainBuffers: 3 121 | vulkanEnableSetSRGBWrite: 0 122 | vulkanEnableLateAcquireNextImage: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 1.0 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 1 135 | xboxOneEnable7thCore: 1 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 1 150 | lumin: 151 | depthFormat: 0 152 | frameTiming: 2 153 | enableGLCache: 0 154 | glCacheMaxBlobSize: 524288 155 | glCacheMaxFileSize: 8388608 156 | oculus: 157 | sharedDepthBuffer: 1 158 | dashSupport: 1 159 | lowOverheadMode: 0 160 | protectedContext: 0 161 | v2Signing: 1 162 | enable360StereoCapture: 0 163 | isWsaHolographicRemotingEnabled: 0 164 | enableFrameTimingStats: 0 165 | useHDRDisplay: 0 166 | D3DHDRBitDepth: 0 167 | m_ColorGamuts: 00000000 168 | targetPixelDensity: 30 169 | resolutionScalingMode: 0 170 | androidSupportedAspectRatio: 1 171 | androidMaxAspectRatio: 2.1 172 | applicationIdentifier: {} 173 | buildNumber: {} 174 | AndroidBundleVersionCode: 1 175 | AndroidMinSdkVersion: 19 176 | AndroidTargetSdkVersion: 0 177 | AndroidPreferredInstallLocation: 1 178 | aotOptions: 179 | stripEngineCode: 1 180 | iPhoneStrippingLevel: 0 181 | iPhoneScriptCallOptimization: 0 182 | ForceInternetPermission: 0 183 | ForceSDCardPermission: 0 184 | CreateWallpaper: 0 185 | APKExpansionFiles: 0 186 | keepLoadedShadersAlive: 0 187 | StripUnusedMeshComponents: 0 188 | VertexChannelCompressionMask: 4054 189 | iPhoneSdkVersion: 988 190 | iOSTargetOSVersionString: 11.0 191 | tvOSSdkVersion: 0 192 | tvOSRequireExtendedGameController: 0 193 | tvOSTargetOSVersionString: 11.0 194 | uIPrerenderedIcon: 0 195 | uIRequiresPersistentWiFi: 0 196 | uIRequiresFullScreen: 1 197 | uIStatusBarHidden: 1 198 | uIExitOnSuspend: 0 199 | uIStatusBarStyle: 0 200 | appleTVSplashScreen: {fileID: 0} 201 | appleTVSplashScreen2x: {fileID: 0} 202 | tvOSSmallIconLayers: [] 203 | tvOSSmallIconLayers2x: [] 204 | tvOSLargeIconLayers: [] 205 | tvOSLargeIconLayers2x: [] 206 | tvOSTopShelfImageLayers: [] 207 | tvOSTopShelfImageLayers2x: [] 208 | tvOSTopShelfImageWideLayers: [] 209 | tvOSTopShelfImageWideLayers2x: [] 210 | iOSLaunchScreenType: 0 211 | iOSLaunchScreenPortrait: {fileID: 0} 212 | iOSLaunchScreenLandscape: {fileID: 0} 213 | iOSLaunchScreenBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreenFillPct: 100 217 | iOSLaunchScreenSize: 100 218 | iOSLaunchScreenCustomXibPath: 219 | iOSLaunchScreeniPadType: 0 220 | iOSLaunchScreeniPadImage: {fileID: 0} 221 | iOSLaunchScreeniPadBackgroundColor: 222 | serializedVersion: 2 223 | rgba: 0 224 | iOSLaunchScreeniPadFillPct: 100 225 | iOSLaunchScreeniPadSize: 100 226 | iOSLaunchScreeniPadCustomXibPath: 227 | iOSUseLaunchScreenStoryboard: 0 228 | iOSLaunchScreenCustomStoryboardPath: 229 | iOSDeviceRequirements: [] 230 | iOSURLSchemes: [] 231 | iOSBackgroundModes: 0 232 | iOSMetalForceHardShadows: 0 233 | metalEditorSupport: 1 234 | metalAPIValidation: 1 235 | iOSRenderExtraFrameOnPause: 0 236 | appleDeveloperTeamID: 237 | iOSManualSigningProvisioningProfileID: 238 | tvOSManualSigningProvisioningProfileID: 239 | iOSManualSigningProvisioningProfileType: 0 240 | tvOSManualSigningProvisioningProfileType: 0 241 | appleEnableAutomaticSigning: 0 242 | iOSRequireARKit: 0 243 | iOSAutomaticallyDetectAndAddCapabilities: 1 244 | appleEnableProMotion: 0 245 | clonedFromGUID: 10ad67313f4034357812315f3c407484 246 | templatePackageId: com.unity.template.2d@4.0.3 247 | templateDefaultScene: Assets/Scenes/SampleScene.unity 248 | AndroidTargetArchitectures: 1 249 | AndroidSplashScreenScale: 0 250 | androidSplashScreen: {fileID: 0} 251 | AndroidKeystoreName: 252 | AndroidKeyaliasName: 253 | AndroidBuildApkPerCpuArchitecture: 0 254 | AndroidTVCompatibility: 0 255 | AndroidIsGame: 1 256 | AndroidEnableTango: 0 257 | androidEnableBanner: 1 258 | androidUseLowAccuracyLocation: 0 259 | androidUseCustomKeystore: 0 260 | m_AndroidBanners: 261 | - width: 320 262 | height: 180 263 | banner: {fileID: 0} 264 | androidGamepadSupportLevel: 0 265 | AndroidMinifyWithR8: 0 266 | AndroidMinifyRelease: 0 267 | AndroidMinifyDebug: 0 268 | AndroidValidateAppBundleSize: 1 269 | AndroidAppBundleSizeToValidate: 150 270 | m_BuildTargetIcons: [] 271 | m_BuildTargetPlatformIcons: [] 272 | m_BuildTargetBatching: [] 273 | m_BuildTargetGraphicsJobs: 274 | - m_BuildTarget: MacStandaloneSupport 275 | m_GraphicsJobs: 0 276 | - m_BuildTarget: Switch 277 | m_GraphicsJobs: 0 278 | - m_BuildTarget: MetroSupport 279 | m_GraphicsJobs: 0 280 | - m_BuildTarget: AppleTVSupport 281 | m_GraphicsJobs: 0 282 | - m_BuildTarget: BJMSupport 283 | m_GraphicsJobs: 0 284 | - m_BuildTarget: LinuxStandaloneSupport 285 | m_GraphicsJobs: 0 286 | - m_BuildTarget: PS4Player 287 | m_GraphicsJobs: 0 288 | - m_BuildTarget: iOSSupport 289 | m_GraphicsJobs: 0 290 | - m_BuildTarget: WindowsStandaloneSupport 291 | m_GraphicsJobs: 0 292 | - m_BuildTarget: XboxOnePlayer 293 | m_GraphicsJobs: 0 294 | - m_BuildTarget: LuminSupport 295 | m_GraphicsJobs: 0 296 | - m_BuildTarget: AndroidPlayer 297 | m_GraphicsJobs: 0 298 | - m_BuildTarget: WebGLSupport 299 | m_GraphicsJobs: 0 300 | m_BuildTargetGraphicsJobMode: [] 301 | m_BuildTargetGraphicsAPIs: 302 | - m_BuildTarget: AndroidPlayer 303 | m_APIs: 150000000b000000 304 | m_Automatic: 0 305 | m_BuildTargetVRSettings: [] 306 | openGLRequireES31: 0 307 | openGLRequireES31AEP: 0 308 | openGLRequireES32: 0 309 | m_TemplateCustomTags: {} 310 | mobileMTRendering: 311 | Android: 1 312 | iPhone: 1 313 | tvOS: 1 314 | m_BuildTargetGroupLightmapEncodingQuality: [] 315 | m_BuildTargetGroupLightmapSettings: [] 316 | playModeTestRunnerEnabled: 0 317 | runPlayModeTestAsEditModeTest: 0 318 | actionOnDotNetUnhandledException: 1 319 | enableInternalProfiler: 0 320 | logObjCUncaughtExceptions: 1 321 | enableCrashReportAPI: 0 322 | cameraUsageDescription: 323 | locationUsageDescription: 324 | microphoneUsageDescription: 325 | switchNMETAOverride: 326 | switchNetLibKey: 327 | switchSocketMemoryPoolSize: 6144 328 | switchSocketAllocatorPoolSize: 128 329 | switchSocketConcurrencyLimit: 14 330 | switchScreenResolutionBehavior: 2 331 | switchUseCPUProfiler: 0 332 | switchUseGOLDLinker: 0 333 | switchApplicationID: 0x01004b9000490000 334 | switchNSODependencies: 335 | switchTitleNames_0: 336 | switchTitleNames_1: 337 | switchTitleNames_2: 338 | switchTitleNames_3: 339 | switchTitleNames_4: 340 | switchTitleNames_5: 341 | switchTitleNames_6: 342 | switchTitleNames_7: 343 | switchTitleNames_8: 344 | switchTitleNames_9: 345 | switchTitleNames_10: 346 | switchTitleNames_11: 347 | switchTitleNames_12: 348 | switchTitleNames_13: 349 | switchTitleNames_14: 350 | switchPublisherNames_0: 351 | switchPublisherNames_1: 352 | switchPublisherNames_2: 353 | switchPublisherNames_3: 354 | switchPublisherNames_4: 355 | switchPublisherNames_5: 356 | switchPublisherNames_6: 357 | switchPublisherNames_7: 358 | switchPublisherNames_8: 359 | switchPublisherNames_9: 360 | switchPublisherNames_10: 361 | switchPublisherNames_11: 362 | switchPublisherNames_12: 363 | switchPublisherNames_13: 364 | switchPublisherNames_14: 365 | switchIcons_0: {fileID: 0} 366 | switchIcons_1: {fileID: 0} 367 | switchIcons_2: {fileID: 0} 368 | switchIcons_3: {fileID: 0} 369 | switchIcons_4: {fileID: 0} 370 | switchIcons_5: {fileID: 0} 371 | switchIcons_6: {fileID: 0} 372 | switchIcons_7: {fileID: 0} 373 | switchIcons_8: {fileID: 0} 374 | switchIcons_9: {fileID: 0} 375 | switchIcons_10: {fileID: 0} 376 | switchIcons_11: {fileID: 0} 377 | switchIcons_12: {fileID: 0} 378 | switchIcons_13: {fileID: 0} 379 | switchIcons_14: {fileID: 0} 380 | switchSmallIcons_0: {fileID: 0} 381 | switchSmallIcons_1: {fileID: 0} 382 | switchSmallIcons_2: {fileID: 0} 383 | switchSmallIcons_3: {fileID: 0} 384 | switchSmallIcons_4: {fileID: 0} 385 | switchSmallIcons_5: {fileID: 0} 386 | switchSmallIcons_6: {fileID: 0} 387 | switchSmallIcons_7: {fileID: 0} 388 | switchSmallIcons_8: {fileID: 0} 389 | switchSmallIcons_9: {fileID: 0} 390 | switchSmallIcons_10: {fileID: 0} 391 | switchSmallIcons_11: {fileID: 0} 392 | switchSmallIcons_12: {fileID: 0} 393 | switchSmallIcons_13: {fileID: 0} 394 | switchSmallIcons_14: {fileID: 0} 395 | switchManualHTML: 396 | switchAccessibleURLs: 397 | switchLegalInformation: 398 | switchMainThreadStackSize: 1048576 399 | switchPresenceGroupId: 400 | switchLogoHandling: 0 401 | switchReleaseVersion: 0 402 | switchDisplayVersion: 1.0.0 403 | switchStartupUserAccount: 0 404 | switchTouchScreenUsage: 0 405 | switchSupportedLanguagesMask: 0 406 | switchLogoType: 0 407 | switchApplicationErrorCodeCategory: 408 | switchUserAccountSaveDataSize: 0 409 | switchUserAccountSaveDataJournalSize: 0 410 | switchApplicationAttribute: 0 411 | switchCardSpecSize: -1 412 | switchCardSpecClock: -1 413 | switchRatingsMask: 0 414 | switchRatingsInt_0: 0 415 | switchRatingsInt_1: 0 416 | switchRatingsInt_2: 0 417 | switchRatingsInt_3: 0 418 | switchRatingsInt_4: 0 419 | switchRatingsInt_5: 0 420 | switchRatingsInt_6: 0 421 | switchRatingsInt_7: 0 422 | switchRatingsInt_8: 0 423 | switchRatingsInt_9: 0 424 | switchRatingsInt_10: 0 425 | switchRatingsInt_11: 0 426 | switchRatingsInt_12: 0 427 | switchLocalCommunicationIds_0: 428 | switchLocalCommunicationIds_1: 429 | switchLocalCommunicationIds_2: 430 | switchLocalCommunicationIds_3: 431 | switchLocalCommunicationIds_4: 432 | switchLocalCommunicationIds_5: 433 | switchLocalCommunicationIds_6: 434 | switchLocalCommunicationIds_7: 435 | switchParentalControl: 0 436 | switchAllowsScreenshot: 1 437 | switchAllowsVideoCapturing: 1 438 | switchAllowsRuntimeAddOnContentInstall: 0 439 | switchDataLossConfirmation: 0 440 | switchUserAccountLockEnabled: 0 441 | switchSystemResourceMemory: 16777216 442 | switchSupportedNpadStyles: 22 443 | switchNativeFsCacheSize: 32 444 | switchIsHoldTypeHorizontal: 0 445 | switchSupportedNpadCount: 8 446 | switchSocketConfigEnabled: 0 447 | switchTcpInitialSendBufferSize: 32 448 | switchTcpInitialReceiveBufferSize: 64 449 | switchTcpAutoSendBufferSizeMax: 256 450 | switchTcpAutoReceiveBufferSizeMax: 256 451 | switchUdpSendBufferSize: 9 452 | switchUdpReceiveBufferSize: 42 453 | switchSocketBufferEfficiency: 4 454 | switchSocketInitializeEnabled: 1 455 | switchNetworkInterfaceManagerInitializeEnabled: 1 456 | switchPlayerConnectionEnabled: 1 457 | ps4NPAgeRating: 12 458 | ps4NPTitleSecret: 459 | ps4NPTrophyPackPath: 460 | ps4ParentalLevel: 11 461 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 462 | ps4Category: 0 463 | ps4MasterVersion: 01.00 464 | ps4AppVersion: 01.00 465 | ps4AppType: 0 466 | ps4ParamSfxPath: 467 | ps4VideoOutPixelFormat: 0 468 | ps4VideoOutInitialWidth: 1920 469 | ps4VideoOutBaseModeInitialWidth: 1920 470 | ps4VideoOutReprojectionRate: 60 471 | ps4PronunciationXMLPath: 472 | ps4PronunciationSIGPath: 473 | ps4BackgroundImagePath: 474 | ps4StartupImagePath: 475 | ps4StartupImagesFolder: 476 | ps4IconImagesFolder: 477 | ps4SaveDataImagePath: 478 | ps4SdkOverride: 479 | ps4BGMPath: 480 | ps4ShareFilePath: 481 | ps4ShareOverlayImagePath: 482 | ps4PrivacyGuardImagePath: 483 | ps4ExtraSceSysFile: 484 | ps4NPtitleDatPath: 485 | ps4RemotePlayKeyAssignment: -1 486 | ps4RemotePlayKeyMappingDir: 487 | ps4PlayTogetherPlayerCount: 0 488 | ps4EnterButtonAssignment: 2 489 | ps4ApplicationParam1: 0 490 | ps4ApplicationParam2: 0 491 | ps4ApplicationParam3: 0 492 | ps4ApplicationParam4: 0 493 | ps4DownloadDataSize: 0 494 | ps4GarlicHeapSize: 2048 495 | ps4ProGarlicHeapSize: 2560 496 | playerPrefsMaxSize: 32768 497 | ps4Passcode: bi9UOuSpM2Tlh01vOzwvSikHFswuzleh 498 | ps4pnSessions: 1 499 | ps4pnPresence: 1 500 | ps4pnFriends: 1 501 | ps4pnGameCustomData: 1 502 | playerPrefsSupport: 0 503 | enableApplicationExit: 0 504 | resetTempFolder: 1 505 | restrictedAudioUsageRights: 0 506 | ps4UseResolutionFallback: 0 507 | ps4ReprojectionSupport: 0 508 | ps4UseAudio3dBackend: 0 509 | ps4UseLowGarlicFragmentationMode: 1 510 | ps4SocialScreenEnabled: 0 511 | ps4ScriptOptimizationLevel: 2 512 | ps4Audio3dVirtualSpeakerCount: 14 513 | ps4attribCpuUsage: 0 514 | ps4PatchPkgPath: 515 | ps4PatchLatestPkgPath: 516 | ps4PatchChangeinfoPath: 517 | ps4PatchDayOne: 0 518 | ps4attribUserManagement: 0 519 | ps4attribMoveSupport: 0 520 | ps4attrib3DSupport: 0 521 | ps4attribShareSupport: 0 522 | ps4attribExclusiveVR: 0 523 | ps4disableAutoHideSplash: 0 524 | ps4videoRecordingFeaturesUsed: 0 525 | ps4contentSearchFeaturesUsed: 0 526 | ps4CompatibilityPS5: 0 527 | ps4GPU800MHz: 1 528 | ps4attribEyeToEyeDistanceSettingVR: 0 529 | ps4IncludedModules: [] 530 | ps4attribVROutputEnabled: 0 531 | monoEnv: 532 | splashScreenBackgroundSourceLandscape: {fileID: 0} 533 | splashScreenBackgroundSourcePortrait: {fileID: 0} 534 | blurSplashScreenBackground: 1 535 | spritePackerPolicy: 536 | webGLMemorySize: 32 537 | webGLExceptionSupport: 1 538 | webGLNameFilesAsHashes: 0 539 | webGLDataCaching: 1 540 | webGLDebugSymbols: 0 541 | webGLEmscriptenArgs: 542 | webGLModulesDirectory: 543 | webGLTemplate: APPLICATION:Default 544 | webGLAnalyzeBuildSize: 0 545 | webGLUseEmbeddedResources: 0 546 | webGLCompressionFormat: 0 547 | webGLWasmArithmeticExceptions: 0 548 | webGLLinkerTarget: 1 549 | webGLThreadsSupport: 0 550 | webGLDecompressionFallback: 0 551 | scriptingDefineSymbols: {} 552 | platformArchitecture: {} 553 | scriptingBackend: {} 554 | il2cppCompilerConfiguration: {} 555 | managedStrippingLevel: {} 556 | incrementalIl2cppBuild: {} 557 | allowUnsafeCode: 0 558 | useDeterministicCompilation: 1 559 | additionalIl2CppArgs: 560 | scriptingRuntimeVersion: 1 561 | gcIncremental: 1 562 | gcWBarrierValidation: 0 563 | apiCompatibilityLevelPerPlatform: {} 564 | m_RenderingPath: 1 565 | m_MobileRenderingPath: 1 566 | metroPackageName: 2D_BuiltInRenderer 567 | metroPackageVersion: 568 | metroCertificatePath: 569 | metroCertificatePassword: 570 | metroCertificateSubject: 571 | metroCertificateIssuer: 572 | metroCertificateNotAfter: 0000000000000000 573 | metroApplicationDescription: 2D_BuiltInRenderer 574 | wsaImages: {} 575 | metroTileShortName: 576 | metroTileShowName: 0 577 | metroMediumTileShowName: 0 578 | metroLargeTileShowName: 0 579 | metroWideTileShowName: 0 580 | metroSupportStreamingInstall: 0 581 | metroLastRequiredScene: 0 582 | metroDefaultTileSize: 1 583 | metroTileForegroundText: 2 584 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 585 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 586 | metroSplashScreenUseBackgroundColor: 0 587 | platformCapabilities: {} 588 | metroTargetDeviceFamilies: {} 589 | metroFTAName: 590 | metroFTAFileTypes: [] 591 | metroProtocolName: 592 | XboxOneProductId: 593 | XboxOneUpdateKey: 594 | XboxOneSandboxId: 595 | XboxOneContentId: 596 | XboxOneTitleId: 597 | XboxOneSCId: 598 | XboxOneGameOsOverridePath: 599 | XboxOnePackagingOverridePath: 600 | XboxOneAppManifestOverridePath: 601 | XboxOneVersion: 1.0.0.0 602 | XboxOnePackageEncryption: 0 603 | XboxOnePackageUpdateGranularity: 2 604 | XboxOneDescription: 605 | XboxOneLanguage: 606 | - enus 607 | XboxOneCapability: [] 608 | XboxOneGameRating: {} 609 | XboxOneIsContentPackage: 0 610 | XboxOneEnableGPUVariability: 1 611 | XboxOneSockets: {} 612 | XboxOneSplashScreen: {fileID: 0} 613 | XboxOneAllowedProductIds: [] 614 | XboxOnePersistentLocalStorageSize: 0 615 | XboxOneXTitleMemory: 8 616 | XboxOneOverrideIdentityName: 617 | XboxOneOverrideIdentityPublisher: 618 | vrEditorSettings: 619 | daydream: 620 | daydreamIconForeground: {fileID: 0} 621 | daydreamIconBackground: {fileID: 0} 622 | cloudServicesEnabled: {} 623 | luminIcon: 624 | m_Name: 625 | m_ModelFolderPath: 626 | m_PortalFolderPath: 627 | luminCert: 628 | m_CertPath: 629 | m_SignPackage: 1 630 | luminIsChannelApp: 0 631 | luminVersion: 632 | m_VersionCode: 1 633 | m_VersionName: 634 | apiCompatibilityLevel: 6 635 | cloudProjectId: 636 | framebufferDepthMemorylessMode: 0 637 | projectName: 638 | organizationId: 639 | cloudEnabled: 0 640 | enableNativePlatformBackendsForNewInputSystem: 0 641 | disableOldInputManagerSupport: 0 642 | legacyClampBlendShapeWeights: 0 643 | virtualTexturingSupportEnabled: 0 644 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.1.13f1 2 | m_EditorVersionWithRevision: 2020.1.13f1 (5e24f28bfbc0) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 255 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | Lumin: 5 228 | Nintendo Switch: 5 229 | PS4: 5 230 | Stadia: 5 231 | Standalone: 5 232 | WebGL: 3 233 | Windows Store Apps: 5 234 | XboxOne: 5 235 | iPhone: 2 236 | tvOS: 2 237 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: 7 | - Through 8 | - Enemy 9 | - Ally 10 | layers: 11 | - Default 12 | - TransparentFX 13 | - Ignore Raycast 14 | - 15 | - Water 16 | - UI 17 | - 18 | - 19 | - Player 20 | - Platforms 21 | - Enemies 22 | - Allies 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | - 42 | - 43 | m_SortingLayers: 44 | - name: Default 45 | uniqueID: 0 46 | locked: 0 47 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2d Unity Movement 2 | 3 | Unity project focused on building a solid foundation for 2d movement [(video demo)](https://youtu.be/SVACshnciMk) - feel free to use it! 4 | 5 | **Last tested version of Unity: 2020.1.13.f1** 6 | 7 | ## Features: 8 | 9 | ✅ No rigidbodies / No 2d physics (allows for tight controls)
✅ Horizontal and vertical collisions
✅ Ascend and descend slopes (constant speed)
✅ Variable jump height
✅ Wall jumps
✅ Wall sliding
✅ Wall grab
✅ Slide down steep slopes
✅ Jump through platforms
✅ Moving platforms (moves passengers as well) 10 | 11 | ## Controls: 12 | 13 | **Movement:**
14 | A/D: Left/Right movement
W: Jump 15 | 16 | **In air:**
17 | S: Fast Fall 18 | 19 | **On wall (facing left):**
20 | W: Wall jump
A+W: Wall jump climb
D+W: Wall leap off
*Opposite controls for facing right* 21 | 22 | ## Project Usage: 23 | 24 | **N.B. You need to enable "Auto Sync Transformations" under the Physics 2D Project Settings.**
25 | 26 | Here's a quick run down of the important scripts/variables: 27 | 28 | **Scripts:** 29 | 30 | - [PlayerInput](Assets/Scripts/PlayerInput.cs) script handles controls. 31 | - [PlayerVelocity](Assets/Scripts/PlayerVelocity.cs) script takes input from the [PlayerInput](Assets/Scripts/PlayerInput.cs) and calculates velocities then outputs displacements. 32 | - [Movement](Assets/Scripts/Movement.cs) takes input displacements (e.g. from [PlayerVelocity](Assets/Scripts/PlayerVelocity.cs)/[PassengerMover](Assets/Scripts/PassengerMover.cs)) then checks for collisions and moves the given object accordingly. 33 | - [MovingPlatform](Assets/Scripts/MovingPlatform.cs) moves a platform, you can also assign the platform to be a [PassengerMover](Assets/Scripts/PassengerMover.cs) then it will move any other objects that have been assigned as a [Passenger](Assets/Scripts/Passenger.cs). 34 | - [BoxColliderCasts](Assets/Scripts/BoxColliderCasts.cs) is a base class to set up raycasts and boxcast origins for collision detection. 35 | 36 | **Adjustable Variables:** 37 | 38 | - [PlayerVelocity](Assets/Scripts/PlayerVelocity.cs) allows you to adjust: 39 | - Move speed (Left/Right movement) 40 | - Jump heights and time to reach jump height (calculates jump speed / gravity) 41 | - Acceleration time on ground and in air (calculates drag on ground and in air) 42 | - Fast fall speed 43 | - Wall jump, jump climb and leap off velocities 44 | - Wall slide speed 45 | - Wall stick time 46 | - [Movement](Assets/Scripts/Movement.cs) allows you to adjust: 47 | - Collision mask - what layers the object should collide with 48 | - Skin width - small tolerance given to collision detection 49 | - Distance between rays - smaller givens better detection but more computation 50 | - [MovingPlatform](Assets/Scripts/MovingPlatform.cs) allows you to adjust: 51 | - Waypoints to travel through 52 | - Platform's travel speed 53 | - Cycle through waypoints or not 54 | - Wait time at waypoints 55 | - Easing 56 | - [PassengerMover](Assets/Scripts/PassengerMover.cs) allows you to adjust: 57 | - Passenger mask - what layer objects should be moved 58 | - Collision mask, Skin width and Distance between rays 59 | 60 | **Layers/Tags:** 61 | 62 | - Through tag should be applied to platforms that can be jumped through 63 | - Player/Enemies/Allies layers can be used to allow collision or not as you wish 64 | - If Player/Enemy/Ally tag used, then object requires [Movement](Assets/Scripts/Movement.cs) to be able to detect collision and move correctly. 65 | 66 | ## 67 | 68 | This was original made by following a Sebastian Lague [video series](https://www.youtube.com/watch?v=MbWK8bCAU2w&list=PLFt_AvWsXl0f0hqURlhyIoAabKPgRsqjz&index=1), but has been heavily adapted to be tighter/smoother. If you'd like to start from scratch or don't understand components of the project I'd suggest using the videos as a guide!
69 | 70 | **Please feel free to post any issues or submit any pull requests and I'll get on em asap :)** 71 | --------------------------------------------------------------------------------