├── .gitignore ├── GameEye2D └── Assets │ ├── GameEye2D.meta │ └── GameEye2D │ ├── Core.meta │ ├── Core │ ├── Behaviours.meta │ ├── Behaviours │ │ ├── FixedFollow.cs │ │ ├── FixedFollow.cs.meta │ │ ├── ScrollZoom.cs │ │ ├── ScrollZoom.cs.meta │ │ ├── Shake.cs │ │ ├── Shake.cs.meta │ │ ├── SmoothFollow.cs │ │ ├── SmoothFollow.cs.meta │ │ ├── SmoothScrollZoom.cs │ │ ├── SmoothScrollZoom.cs.meta │ │ ├── ZoomToFit.cs │ │ └── ZoomToFit.cs.meta │ ├── Camera2D.cs │ ├── Camera2D.cs.meta │ ├── Focuses.meta │ ├── Focuses │ │ ├── F_RigidBody.cs │ │ ├── F_RigidBody.cs.meta │ │ ├── F_RigidBody2D.cs │ │ ├── F_RigidBody2D.cs.meta │ │ ├── F_Transform.cs │ │ ├── F_Transform.cs.meta │ │ ├── Focus2D.cs │ │ ├── Focus2D.cs.meta │ │ ├── FollowRail.cs │ │ ├── FollowRail.cs.meta │ │ ├── FollowRailX.cs │ │ ├── FollowRailX.cs.meta │ │ ├── FollowRailY.cs │ │ ├── FollowRailY.cs.meta │ │ ├── MouseCursor.cs │ │ ├── MouseCursor.cs.meta │ │ ├── Rail.cs │ │ ├── Rail.cs.meta │ │ ├── SimpleMoving.cs │ │ ├── SimpleMoving.cs.meta │ │ ├── TimedRail.cs │ │ ├── TimedRail.cs.meta │ │ ├── TimedTrigger.cs │ │ ├── TimedTrigger.cs.meta │ │ ├── Trigger.cs │ │ ├── Trigger.cs.meta │ │ ├── WorldCursor.cs │ │ ├── WorldCursor.cs.meta │ │ ├── WorldCursorLimited.cs │ │ └── WorldCursorLimited.cs.meta │ ├── Tools.meta │ └── Tools │ │ ├── ClampToScreen.cs │ │ ├── ClampToScreen.cs.meta │ │ ├── Parallax.cs │ │ ├── Parallax.cs.meta │ │ ├── TriggerCameraLimits.cs │ │ ├── TriggerCameraLimits.cs.meta │ │ ├── TriggerCameras.cs │ │ ├── TriggerCameras.cs.meta │ │ ├── TriggerFocusList.cs │ │ ├── TriggerFocusList.cs.meta │ │ ├── TriggerZoom.cs │ │ └── TriggerZoom.cs.meta │ ├── Editor.meta │ ├── Editor │ ├── Resources.meta │ ├── Resources │ │ ├── Arena.prefab │ │ ├── Arena.prefab.meta │ │ ├── Follow Rail Focus2D.prefab │ │ ├── Follow Rail Focus2D.prefab.meta │ │ ├── Follow X Rail Focus2D.prefab │ │ ├── Follow X Rail Focus2D.prefab.meta │ │ ├── Follow Y Rail Focus2D.prefab │ │ ├── Follow Y Rail Focus2D.prefab.meta │ │ ├── Game Camera.prefab │ │ ├── Game Camera.prefab.meta │ │ ├── Keep Mesh on Screen.prefab │ │ ├── Keep Mesh on Screen.prefab.meta │ │ ├── Parralax.prefab │ │ ├── Parralax.prefab.meta │ │ ├── Platformer.prefab │ │ ├── Platformer.prefab.meta │ │ ├── RigidyBody Focus2D.prefab │ │ ├── RigidyBody Focus2D.prefab.meta │ │ ├── RigidyBody2D Focus2D.prefab │ │ ├── RigidyBody2D Focus2D.prefab.meta │ │ ├── Role Playing Game.prefab │ │ ├── Role Playing Game.prefab.meta │ │ ├── Runner.prefab │ │ ├── Runner.prefab.meta │ │ ├── Shoot Em Up.prefab │ │ ├── Shoot Em Up.prefab.meta │ │ ├── Simple Moving Focus2D.prefab │ │ ├── Simple Moving Focus2D.prefab.meta │ │ ├── Strategy Cam2D.prefab │ │ ├── Strategy Cam2D.prefab.meta │ │ ├── Timed Rail Focus2D.prefab │ │ ├── Timed Rail Focus2D.prefab.meta │ │ ├── Timed Trigger Focus2D.prefab │ │ ├── Timed Trigger Focus2D.prefab.meta │ │ ├── Transform Focus2D.prefab │ │ ├── Transform Focus2D.prefab.meta │ │ ├── Trigger Camera Limits.prefab │ │ ├── Trigger Camera Limits.prefab.meta │ │ ├── Trigger Cameras.prefab │ │ ├── Trigger Cameras.prefab.meta │ │ ├── Trigger Focus List.prefab │ │ ├── Trigger Focus List.prefab.meta │ │ ├── Trigger Focus2D.prefab │ │ ├── Trigger Focus2D.prefab.meta │ │ ├── Trigger Zoom.prefab │ │ ├── Trigger Zoom.prefab.meta │ │ ├── World Cursor Focus2D.prefab │ │ ├── World Cursor Focus2D.prefab.meta │ │ ├── World Cursor Limited Focus2D.prefab │ │ └── World Cursor Limited Focus2D.prefab.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── GameEye2DMenu.cs │ │ ├── GameEye2DMenu.cs.meta │ │ ├── RailEditor.cs │ │ └── RailEditor.cs.meta │ ├── Examples.meta │ ├── Examples │ ├── Materials.meta │ ├── Materials │ │ ├── Background.mat │ │ ├── Background.mat.meta │ │ ├── Bars.mat │ │ ├── Bars.mat.meta │ │ ├── BounceWalls.mat │ │ ├── BounceWalls.mat.meta │ │ ├── Player.mat │ │ ├── Player.mat.meta │ │ ├── StarsYellow.mat │ │ ├── StarsYellow.mat.meta │ │ ├── Walls.mat │ │ └── Walls.mat.meta │ ├── PhysicsMaterials.meta │ ├── PhysicsMaterials │ │ ├── Ball.physicsMaterial2D │ │ ├── Ball.physicsMaterial2D.meta │ │ ├── Ball3D.physicMaterial │ │ ├── Ball3D.physicMaterial.meta │ │ ├── Player.physicsMaterial2D │ │ └── Player.physicsMaterial2D.meta │ ├── Resources.meta │ ├── Resources │ │ ├── Ball 3D.prefab │ │ ├── Ball 3D.prefab.meta │ │ ├── Ball.prefab │ │ └── Ball.prefab.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── Behaviors.meta │ │ ├── Behaviors │ │ │ ├── Fixed Follow.unity │ │ │ ├── Fixed Follow.unity.meta │ │ │ ├── Scroll Zoom.unity │ │ │ ├── Scroll Zoom.unity.meta │ │ │ ├── Shake.unity │ │ │ ├── Shake.unity.meta │ │ │ ├── Smooth Follow.unity │ │ │ ├── Smooth Follow.unity.meta │ │ │ ├── Smooth Scroll Zoom.unity │ │ │ ├── Smooth Scroll Zoom.unity.meta │ │ │ ├── Zoom To Fit - Press Mouse 1.unity │ │ │ └── Zoom To Fit - Press Mouse 1.unity.meta │ │ ├── Focus.meta │ │ ├── Focus │ │ │ ├── Follow Rail X.unity │ │ │ ├── Follow Rail X.unity.meta │ │ │ ├── Follow Rail Y.unity │ │ │ ├── Follow Rail Y.unity.meta │ │ │ ├── Follow Rail.unity │ │ │ ├── Follow Rail.unity.meta │ │ │ ├── Mouse Cursor.unity │ │ │ ├── Mouse Cursor.unity.meta │ │ │ ├── Rigid Body 2D.unity │ │ │ ├── Rigid Body 2D.unity.meta │ │ │ ├── Rigid Body.unity │ │ │ ├── Rigid Body.unity.meta │ │ │ ├── Simple Moving.unity │ │ │ ├── Simple Moving.unity.meta │ │ │ ├── Timed Rail.unity │ │ │ ├── Timed Rail.unity.meta │ │ │ ├── Timed Trigger.unity │ │ │ ├── Timed Trigger.unity.meta │ │ │ ├── Transform.unity │ │ │ ├── Transform.unity.meta │ │ │ ├── Trigger.unity │ │ │ ├── Trigger.unity.meta │ │ │ ├── World Cursor Limited.unity │ │ │ ├── World Cursor Limited.unity.meta │ │ │ ├── World Cursor.unity │ │ │ └── World Cursor.unity.meta │ │ ├── Tools.meta │ │ └── Tools │ │ │ ├── Clamp To Screen.unity │ │ │ ├── Clamp To Screen.unity.meta │ │ │ ├── Parralax.unity │ │ │ ├── Parralax.unity.meta │ │ │ ├── Trigger Camera Limits.unity │ │ │ ├── Trigger Camera Limits.unity.meta │ │ │ ├── Trigger Cameras.unity │ │ │ ├── Trigger Cameras.unity.meta │ │ │ ├── Trigger Focus List.unity │ │ │ ├── Trigger Focus List.unity.meta │ │ │ ├── Trigger Zoom.unity │ │ │ └── Trigger Zoom.unity.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── Ball3DMove.cs │ │ ├── Ball3DMove.cs.meta │ │ ├── BallMove.cs │ │ ├── BallMove.cs.meta │ │ ├── BallSpawner.cs │ │ ├── BallSpawner.cs.meta │ │ ├── KillZone.cs │ │ ├── KillZone.cs.meta │ │ ├── KillZoneResetRail.cs │ │ ├── KillZoneResetRail.cs.meta │ │ ├── KillZoneResetTrigger.cs │ │ ├── KillZoneResetTrigger.cs.meta │ │ ├── PlayerMovement.cs │ │ └── PlayerMovement.cs.meta │ ├── Game Eye 2D Documentation.pdf │ └── Game Eye 2D Documentation.pdf.meta ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Visual Studio 3 | ################# 4 | 5 | # User-specific files 6 | *.suo 7 | *.user 8 | *.sln.docstates 9 | *.csproj 10 | 11 | 12 | GameEye2D/GameEye2D.sln 13 | GameEye2D/Temp 14 | GameEye2D/Library 15 | GameEye2D/ProjectSettings 16 | GameEye2D/Assets/AssetStoreTools 17 | GameEye2D/Assets/AssetStoreTools.meta 18 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8ce56106166ef54ab9a6da7811982eb 3 | folderAsset: yes 4 | timeCreated: 1484738287 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 226f9477583ed074a815a8a58cfe81ef 3 | folderAsset: yes 4 | timeCreated: 1481116042 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef4ee874c075540419789e72cf5410fe 3 | folderAsset: yes 4 | timeCreated: 1481121113 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/FixedFollow.cs: -------------------------------------------------------------------------------- 1 | /* Camera2D Fixed Follow v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Behaviour 10 | { 11 | /// 12 | /// When attached to a transform with a Camera2D, causes the camera’s position to be exactly at the center of the action. The behavior can be paused by disabling it. 13 | /// 14 | [AddComponentMenu("GameEye2D/Behaviours/Fixed Follow")] 15 | [RequireComponent(typeof(Camera2D))] 16 | public class FixedFollow : MonoBehaviour { 17 | 18 | //The camera 2D that tracks the action and moves the camera 19 | Camera2D m_Camera2D; 20 | 21 | 22 | /// 23 | /// Gets the camera2D used by this behavior. 24 | /// 25 | public Camera2D camera2D 26 | { 27 | get 28 | { 29 | if (m_Camera2D == null) 30 | { 31 | m_Camera2D = GetComponent(); 32 | } 33 | return m_Camera2D; 34 | } 35 | } 36 | 37 | //After the objects have all moved set the camera position to look at the desired position 38 | void LateUpdate() 39 | { 40 | camera2D.position2D = camera2D.actionRect.center; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/FixedFollow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98743c09acee7944e95d799fce1cfccd 3 | timeCreated: 1475042270 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/ScrollZoom.cs: -------------------------------------------------------------------------------- 1 | /* Camera2D Scroll Zoom v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Behaviour 10 | { 11 | /// 12 | /// When attached to a transform with a Camera2D, causes the camera’s orthographic size to change based on the input of the player. The most common use is to allow the mouse wheel to scroll the camera in and out. The behavior can be paused by disabling it. 13 | /// 14 | [AddComponentMenu("GameEye2D/Behaviours/Scroll Zoom")] 15 | [RequireComponent(typeof(Camera2D))] 16 | public class ScrollZoom : MonoBehaviour 17 | { 18 | //The camera 2D that tracks the action and moves the camera 19 | Camera2D m_Camera2D; 20 | 21 | //The minimum zoom scrolling will allow 22 | [SerializeField] float m_MinimumZoom = 5f; 23 | 24 | //The highest zoom scrolling will allow 25 | [SerializeField] float m_MaxZoom = 20f; 26 | 27 | //Input for scrolling 28 | [SerializeField] string m_ScrollInput = "Mouse ScrollWheel"; 29 | 30 | 31 | /// 32 | /// Gets the camera2D used by this behavior. 33 | /// 34 | public Camera2D camera2D 35 | { 36 | get 37 | { 38 | if (m_Camera2D == null) 39 | { 40 | m_Camera2D = GetComponent(); 41 | } 42 | return m_Camera2D; 43 | } 44 | } 45 | 46 | /// 47 | /// Gets or sets the minimum orthographic size possible by scrolling the camera. 48 | /// 49 | public float minimumZoom 50 | { 51 | get { return m_MinimumZoom; } 52 | set { m_MinimumZoom = value; } 53 | } 54 | 55 | /// 56 | /// Gets or sets the maximum orthographic size possible by scrolling the camera. 57 | /// 58 | public float maximumZoom 59 | { 60 | get { return m_MaxZoom; } 61 | set { m_MaxZoom = value; } 62 | } 63 | 64 | /// 65 | /// Gets or sets the input used to scroll the camera. 66 | /// 67 | public string scrollInput 68 | { 69 | get { return m_ScrollInput; } 70 | set { m_ScrollInput = value; } 71 | } 72 | 73 | 74 | //After all the objects have moved, check for axis input and zoom the camera accordingly 75 | void LateUpdate () 76 | { 77 | camera2D.zoom = Mathf.Clamp(camera2D.zoom - Input.GetAxis(scrollInput), minimumZoom, maximumZoom); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/ScrollZoom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1787ca55586a83f47a54824aba75e89f 3 | timeCreated: 1478161436 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/Shake.cs: -------------------------------------------------------------------------------- 1 | /* Camera2D Shake v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Behaviour 10 | { 11 | /// 12 | /// When attached to a transform with a Camera2D, provides public functions that cause the camera's position to change as if a heavy force was applied. The behavior can be paused by disabling it. 13 | /// 14 | [AddComponentMenu("GameEye2D/Behaviours/Shake")] 15 | [RequireComponent(typeof(Camera2D))] 16 | public class Shake : MonoBehaviour { 17 | 18 | //The camera 2D that tracks the action and moves the camera 19 | Camera2D m_Camera2D; 20 | 21 | //The magnitude and length of the camera shake 22 | //The minimum force to shake is subtracted from any shake 23 | [SerializeField] float m_MinForceToShake = 30f; 24 | [SerializeField] float m_BaseShakeAmount = 0.01f; 25 | [SerializeField] float m_BaseShakeTime = 0.004f; 26 | 27 | //Properties of the shake are stored for calculations when the shake function is called 28 | float m_OriginalShakeTimer = 0f; 29 | float m_ShakeTimer = 0f; 30 | float m_ShakeMagnitude = 0f; 31 | Vector2 m_ShakeOffset; 32 | 33 | 34 | /// 35 | /// Gets the camera2D used by this behavior. 36 | /// 37 | public Camera2D camera2D 38 | { 39 | get 40 | { 41 | if (m_Camera2D == null) 42 | { 43 | m_Camera2D = GetComponent(); 44 | } 45 | return m_Camera2D; 46 | } 47 | } 48 | 49 | /// 50 | /// Gets or sets to minimum force magnitude required to shake the camera. This amount is subtracted from all shake forces. 51 | /// 52 | public float minimumForceToShake 53 | { 54 | get { return m_MinForceToShake; } 55 | set { m_MinForceToShake = value; } 56 | } 57 | 58 | /// 59 | /// Returns if the camera is shaking 60 | /// 61 | public bool isShaking 62 | { 63 | get { return m_ShakeTimer > 0f; } 64 | } 65 | 66 | /// 67 | /// Gets how much the camera is offset due to the camera shaking. 68 | /// 69 | public Vector2 shakeOffset 70 | { 71 | get { return m_ShakeOffset; } 72 | } 73 | 74 | 75 | //When the component is disabled, the camera will not shake 76 | void OnDisable () 77 | { 78 | EndShake(); 79 | } 80 | 81 | //After all the objects have moved, update the shake amount, timer, and direction on each frame 82 | void LateUpdate () 83 | { 84 | //If the camera is shaking 85 | if (isShaking) 86 | { 87 | //Calculate the position of the camera without the shaking applied 88 | Vector2 originalPos = camera2D.position2D - m_ShakeOffset; 89 | 90 | //Calculate a shake offset based on the force of the crash, with a little randomness and gradually weakening as the shake ends. 91 | m_ShakeOffset += Random.insideUnitCircle * m_ShakeMagnitude * camera2D.zoom; 92 | m_ShakeOffset *= m_ShakeTimer / m_OriginalShakeTimer; 93 | m_ShakeTimer -= Time.unscaledDeltaTime; 94 | 95 | //Set camera position 96 | camera2D.position2D = originalPos + m_ShakeOffset; 97 | 98 | //Account for shifting due to being clamped to camera limits 99 | m_ShakeOffset = camera2D.position2D - originalPos; 100 | } 101 | //If the camera has just finished shaking 102 | else if (m_ShakeOffset != Vector2.zero) 103 | { 104 | EndShake(); 105 | } 106 | } 107 | 108 | /// 109 | /// Causes the camera to shake, given a magnitude used for the amount of shaking and for how long. 110 | /// 111 | public void ShakeCamera(float magnitude) 112 | { 113 | if (!enabled) 114 | { 115 | return; 116 | } 117 | 118 | //Ignore minor forces 119 | float baseShake = (magnitude - m_MinForceToShake); 120 | float shakeMagnitude = baseShake * m_BaseShakeAmount; 121 | if (shakeMagnitude < 0 || shakeMagnitude < m_ShakeOffset.magnitude) 122 | { 123 | return; 124 | } 125 | 126 | //Set the new camera shake force 127 | m_ShakeMagnitude = shakeMagnitude; 128 | 129 | //Set the current shake time 130 | m_ShakeTimer = m_BaseShakeTime * baseShake; 131 | m_OriginalShakeTimer = m_ShakeTimer; 132 | } 133 | 134 | /// 135 | /// Causes the camera to shake, given a force that caused the shake to be used for direction, magnitude and how long the camera shakes. 136 | /// 137 | public void ShakeCamera(Vector2 force) 138 | { 139 | if (!enabled) 140 | { 141 | return; 142 | } 143 | 144 | //Ignore minor forces 145 | float baseShake = (force.magnitude - m_MinForceToShake); 146 | float shakeMagnitude = baseShake * m_BaseShakeAmount; 147 | if (shakeMagnitude < 0 || shakeMagnitude < m_ShakeOffset.magnitude) 148 | { 149 | return; 150 | } 151 | 152 | //Set the new camera shake force 153 | m_ShakeMagnitude = shakeMagnitude; 154 | 155 | //Set the current shake time 156 | m_ShakeTimer = m_BaseShakeTime * baseShake; 157 | m_OriginalShakeTimer = m_ShakeTimer; 158 | 159 | //Cause an instant shake following the force of the impact 160 | Vector2 instantShake = -force.normalized * m_ShakeMagnitude * camera2D.zoom; 161 | camera2D.position2D += instantShake; 162 | m_ShakeOffset += instantShake; 163 | } 164 | 165 | /// 166 | /// If the camera is currently shaking, it stops shaking. 167 | /// 168 | public void EndShake () 169 | { 170 | m_ShakeTimer = 0f; 171 | camera2D.position2D -= m_ShakeOffset; 172 | m_ShakeOffset = Vector2.zero; 173 | } 174 | 175 | 176 | #if UNITY_EDITOR 177 | 178 | //Whether to draw debug data or not 179 | [SerializeField] bool m_DrawDebug = false; 180 | 181 | 182 | //In the scene window draw the camera limits and action rect 183 | void OnDrawGizmos () 184 | { 185 | if (m_DrawDebug && Application.isPlaying) 186 | { 187 | //Set the gizmo color for the line towards the desired position 188 | Gizmos.color = Color.yellow; 189 | 190 | #if GAMEEYE2D_XZ 191 | //Draw the line towards the desired position 192 | Gizmos.DrawLine(transform.position, transform.position - new Vector3(m_ShakeOffset.x, transform.position.y, m_ShakeOffset.y)); 193 | #else 194 | //Draw the line towards the desired position 195 | Gizmos.DrawLine(transform.position, transform.position - new Vector3(m_ShakeOffset.x, m_ShakeOffset.y, transform.position.z)); 196 | #endif 197 | } 198 | } 199 | 200 | #endif 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/Shake.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7c035cc6ea2a0745b9618fd53bd6189 3 | timeCreated: 1478161437 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/SmoothFollow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fc239a298246fa45bfa7b6357a68bf9 3 | timeCreated: 1478161436 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/SmoothScrollZoom.cs: -------------------------------------------------------------------------------- 1 | /* Camera2D Smooth Scroll Zoom v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Behaviour 10 | { 11 | /// 12 | /// When attached to a transform with a Camera2D, causes the camera’s orthographic size to smoothly change based on the input of the player. The most common use is to allow the mouse wheel to scroll the camera in and out. The behavior can be paused by disabling it. 13 | /// 14 | [AddComponentMenu("GameEye2D/Behaviours/Smooth Scroll Zoom")] 15 | public class SmoothScrollZoom : ScrollZoom 16 | { 17 | //How fast the camera zooms in and out to follow the input scroll. 18 | [SerializeField] float m_Speed = 1f; 19 | 20 | //How much the camera will zoom to 21 | float m_DesiredZoom = 5f; 22 | const float ZOOM_THRESHOLD = 0.1f; 23 | 24 | /// 25 | /// How fast the camera zooms in and out to follow the input scroll. 26 | /// 27 | public float speed 28 | { 29 | get { return m_Speed; } 30 | set { m_Speed = value; } 31 | } 32 | 33 | 34 | //Initialize the desired zoom 35 | void Start () 36 | { 37 | m_DesiredZoom = camera2D.zoom; 38 | } 39 | 40 | //After all the objects have moved, check for axis input and zoom the camera accordingly 41 | void LateUpdate() 42 | { 43 | m_DesiredZoom = Mathf.Clamp(m_DesiredZoom - Input.GetAxis(scrollInput), minimumZoom, maximumZoom); 44 | float difference = m_DesiredZoom - camera2D.zoom; 45 | 46 | if (Mathf.Abs(difference) > ZOOM_THRESHOLD) 47 | { 48 | camera2D.zoom += difference * speed * Time.deltaTime; 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/SmoothScrollZoom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ea503bd38d249142809e95b595ab137 3 | timeCreated: 1479929690 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/ZoomToFit.cs: -------------------------------------------------------------------------------- 1 | /* Camera2D Zoom to fit. v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Behaviour 10 | { 11 | /// 12 | /// When attached to a transform with a Camera2D, smoothly zooms the camera’s view in or out to contain the action rect calculated by Camera2D. The behavior can be paused by disabling it. 13 | /// 14 | [AddComponentMenu("GameEye2D/Behaviours/ZoomToFit")] 15 | [RequireComponent(typeof(Camera2D))] 16 | public class ZoomToFit : MonoBehaviour { 17 | 18 | //The camera 2D that tracks the action and moves the camera 19 | Camera2D m_Camera2D; 20 | 21 | //The speed the camera zooms in and out and the desired orthographic size to zoom to 22 | [SerializeField] float m_Speed = 1f; 23 | 24 | //How much the action bounds must change to update the desired zoom to lerp to. 25 | [SerializeField] float m_StillThreshold = 3f; 26 | float m_LastDistance = 0f; 27 | 28 | //The lowest that ZoomToFit will update the camera’s orthographic size to. 29 | [SerializeField] float m_MinimumZoom = 5f; 30 | 31 | 32 | /// 33 | /// Gets the camera2D used by this behavior. 34 | /// 35 | public Camera2D camera2D 36 | { 37 | get 38 | { 39 | if (m_Camera2D == null) 40 | { 41 | m_Camera2D = GetComponent(); 42 | } 43 | return m_Camera2D; 44 | } 45 | } 46 | 47 | /// 48 | /// Gets or sets how fast the camera zooms in or out. 49 | /// 50 | public float speed 51 | { 52 | get { return m_Speed; } 53 | set { m_Speed = value; } 54 | } 55 | 56 | /// 57 | /// Gets or sets how much the action rect must expand or shrink in order to update the desired zoom. 58 | /// 59 | public float stillThreshold 60 | { 61 | get { return m_StillThreshold; } 62 | set { m_StillThreshold = value; } 63 | } 64 | 65 | /// 66 | /// Gets or sets the lowest that ZoomToFit will update the camera’s orthographic size to. 67 | /// 68 | public float minimumZoom 69 | { 70 | get { return m_MinimumZoom;} 71 | set { m_MinimumZoom = value;} 72 | } 73 | 74 | //After all the objects have moved, lerp the camera's zoom to fit the points of interest. 75 | void LateUpdate() 76 | { 77 | //Optimal zoom to fit everything on screen 78 | float perfectZoom = camera2D.WorldToZoom(camera2D.actionRect.size); 79 | 80 | //If the camera is already zooming, or the action rect has changed significantly from the last desired zoom, change the desired zoom to lerp to. 81 | if (Mathf.Abs(perfectZoom - camera2D.zoom) > stillThreshold || Mathf.Abs(m_LastDistance) > m_Speed) 82 | { 83 | m_LastDistance = Mathf.Max(perfectZoom, minimumZoom) - camera2D.zoom; 84 | camera2D.zoom += m_LastDistance * Mathf.Min(speed * Time.unscaledDeltaTime, 1f); 85 | } 86 | else 87 | { 88 | m_LastDistance = 0f; 89 | } 90 | } 91 | 92 | #if UNITY_EDITOR 93 | 94 | //Whether to draw debug data or not 95 | [SerializeField] bool m_DrawDebug = false; 96 | 97 | 98 | //In the scene window draw the camera limits and action rect 99 | void OnDrawGizmosSelected () 100 | { 101 | if (m_DrawDebug) 102 | { 103 | //Calculate and clamp the zooms that would cause the desired zoom to change 104 | float smallestZoom = Mathf.Max(camera2D.zoom - stillThreshold, minimumZoom); 105 | float largestZoom = Mathf.Min(camera2D.zoom + stillThreshold, camera2D.MaximumZoom(camera2D.cameraLimits.size)); 106 | 107 | //Calculate half the width of the rect's 108 | float XsmallestSize = smallestZoom * camera2D.gameCamera.aspect; 109 | float XlargestSize = largestZoom * camera2D.gameCamera.aspect; 110 | 111 | //Draw the smallest and largest zooms, and the action rect at the center of the camera for comparison 112 | DrawGizmoRect( new Rect ( camera2D.position2D.x - XsmallestSize, camera2D.position2D.y - smallestZoom, 113 | XsmallestSize * 2f, smallestZoom * 2f), 114 | Color.cyan); 115 | DrawGizmoRect( new Rect ( camera2D.position2D.x - XlargestSize, camera2D.position2D.y - largestZoom, 116 | XlargestSize * 2f, largestZoom * 2f), 117 | Color.cyan); 118 | Rect actionRectAtCamera = camera2D.actionRect; 119 | actionRectAtCamera.center = camera2D.position2D; 120 | DrawGizmoRect(actionRectAtCamera, Color.green); 121 | } 122 | } 123 | 124 | //Draws the given rect using gizmos 125 | void DrawGizmoRect (Rect rect, Color color) 126 | { 127 | //Set the gizmo color 128 | Gizmos.color = color; 129 | 130 | #if GAMEEYE2D_XZ 131 | //Get the rect's corner positions 132 | Vector3 topLeft = new Vector3(rect.xMin, transform.position.y, rect.yMax); 133 | Vector3 botLeft = new Vector3(rect.xMin, transform.position.y, rect.yMin); 134 | Vector3 topRight = new Vector3(rect.xMax, transform.position.y, rect.yMax); 135 | Vector3 botRight = new Vector3(rect.xMax, transform.position.y, rect.yMin); 136 | #else 137 | //Get the rect's corner positions 138 | Vector3 topLeft = new Vector3(rect.xMin, rect.yMax, transform.position.z); 139 | Vector3 botLeft = new Vector3(rect.xMin, rect.yMin, transform.position.z); 140 | Vector3 topRight = new Vector3(rect.xMax, rect.yMax, transform.position.z); 141 | Vector3 botRight = new Vector3(rect.xMax, rect.yMin, transform.position.z); 142 | #endif 143 | //Draw the rect 144 | Gizmos.DrawLine(topLeft, botLeft); 145 | Gizmos.DrawLine(topRight, botRight); 146 | Gizmos.DrawLine(topLeft, topRight); 147 | Gizmos.DrawLine(botLeft, botRight); 148 | } 149 | #endif 150 | } 151 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Behaviours/ZoomToFit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5aa7f62fb8414814fa809d686b161985 3 | timeCreated: 1478161436 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Camera2D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9c99bf64ac69e947a7b7f4faf6a8e1f 3 | timeCreated: 1474534232 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc0953b5f22680e47af0f3363382285b 3 | folderAsset: yes 4 | timeCreated: 1478161880 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/F_RigidBody.cs: -------------------------------------------------------------------------------- 1 | /* Rigid Body v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// When attached to a transform with a rigidbody, creates a focus point that is at the position of the transform. If the rigidbody has a velocity, the focus point leads ahead of the transform in the direction of the velocity. The conversion from velocity to offset can be set through the inspector. 13 | /// 14 | [AddComponentMenu("GameEye2D/Focus2D/Rigid Body")] 15 | [RequireComponent(typeof(Rigidbody))] 16 | public class F_RigidBody : F_Transform { 17 | 18 | //The object's rigidbody2D is used to determine the point of interest 19 | Rigidbody m_RigidBody; 20 | 21 | //How much the camera looks ahead of where a rigidbody is going 22 | [SerializeField] Vector2 m_VelocityToOffset = new Vector2 (0.6f, 0.1f); 23 | 24 | 25 | /// 26 | /// Gets the rigidBody of the focus. 27 | /// 28 | public Rigidbody body 29 | { 30 | get 31 | { if (m_RigidBody == null) 32 | { 33 | m_RigidBody = GetComponent(); 34 | } 35 | return m_RigidBody; 36 | } 37 | } 38 | 39 | /// 40 | /// Gets where the point of interest of this rigidbody is. 41 | /// For a rigidbody focus the point of interest is where the object is moving towards, plus the offset provided. 42 | /// 43 | public override Vector2 GetFocusPoint () 44 | { 45 | #if GAMEEYE2D_XZ 46 | return base.GetFocusPoint() + new Vector2(body.velocity.x * m_VelocityToOffset.x, body.velocity.z * m_VelocityToOffset.y); 47 | #else 48 | return base.GetFocusPoint() + new Vector2(body.velocity.x * m_VelocityToOffset.x, body.velocity.y * m_VelocityToOffset.y); 49 | #endif 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/F_RigidBody.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f32f7a82f0df5b489bb9cf56cb6fddb 3 | timeCreated: 1478162615 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/F_RigidBody2D.cs: -------------------------------------------------------------------------------- 1 | /* Rigid Body 2D v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// When attached to a transform with a rigidbody2D, creates a focus point that is at the position of the transform. If the rigidbody2D has a velocity, the focus point leads ahead of the transform in the direction of the velocity. The conversion from velocity to offset can be set through the inspector. 13 | /// 14 | [AddComponentMenu("GameEye2D/Focus2D/Rigid Body 2D")] 15 | [RequireComponent(typeof(Rigidbody2D))] 16 | public class F_RigidBody2D : F_Transform { 17 | 18 | //The object's rigidbody2D is used to determine the point of interest 19 | Rigidbody2D m_RigidBody2D; 20 | 21 | //How much the camera looks ahead of where the rigidbody is going 22 | [SerializeField] Vector2 m_VelocityToOffset = new Vector2 (0.6f, 0.1f); 23 | 24 | 25 | /// 26 | /// Gets the rigidBody of the focus. 27 | /// 28 | public Rigidbody2D body2D 29 | { 30 | get 31 | { if (m_RigidBody2D == null) 32 | { 33 | m_RigidBody2D = GetComponent(); 34 | } 35 | return m_RigidBody2D; 36 | } 37 | } 38 | 39 | /// 40 | /// Gets where the point of interest of this rigidbody is. 41 | /// For a rigidbody2D focus the point of interest is where the object is moving towards, plus the offset provided. 42 | /// 43 | public override Vector2 GetFocusPoint () 44 | { 45 | return base.GetFocusPoint() + new Vector2(body2D.velocity.x * m_VelocityToOffset.x, body2D.velocity.y * m_VelocityToOffset.y); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/F_RigidBody2D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5ef66453f88bfc45919e47b06ff9f19 3 | timeCreated: 1478162616 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/F_Transform.cs: -------------------------------------------------------------------------------- 1 | /* Transform v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// When attached to a transform, creates a focus point that is at the position of the transform. This point can be offset through the inspector. 13 | /// 14 | /// 15 | [AddComponentMenu("GameEye2D/Focus2D/Transform")] 16 | public class F_Transform : Focus2D 17 | { 18 | //An offset added to the position of the focus point. 19 | [SerializeField] Vector2 m_Offset; 20 | public Vector2 offset 21 | { 22 | get { return m_Offset; } 23 | set { m_Offset = value; } 24 | } 25 | 26 | /// 27 | /// Gets where the point of interest of this transform is. 28 | /// 29 | public override Vector2 GetFocusPoint () 30 | { 31 | //Return this object's point of interest 32 | return position2D + offset; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/F_Transform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 807f8d2bf0831224f8b2f509fa2f073f 3 | timeCreated: 1478162616 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/Focus2D.cs: -------------------------------------------------------------------------------- 1 | /* Focus2D v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// An abstract class that focuses inherit from, allowing the camera to use inheriting classes as a focus when calculating the action rect. 13 | /// Focus2Ds calculate the point of interest of any gameobject they are attached to.Camera2D uses these points to determine the optimal view. 14 | /// 15 | public abstract class Focus2D : MonoBehaviour 16 | { 17 | /// 18 | /// A public function for the camera to use to find this object's point of interest. When making your own focus's you must implement this function. 19 | /// 20 | public abstract Vector2 GetFocusPoint (); 21 | 22 | 23 | //How much the action rect is influenced by this focus by scaling the focus point's offset from the camera. 24 | [SerializeField] Vector2 m_Influence = Vector2.one; 25 | 26 | 27 | /// 28 | /// Gets or sets the position of the focus object as a vector2. 29 | /// 30 | public virtual Vector2 position2D 31 | { 32 | #if GAMEEYE2D_XZ 33 | 34 | get {return new Vector2 (transform.position.x, transform.position.z);} 35 | set {transform.position = new Vector3(value.x, transform.position.y, value.y); } 36 | 37 | #else 38 | 39 | get { return new Vector2 (transform.position.x, transform.position.y);} 40 | set { transform.position = new Vector3(value.x, value.y, transform.position.z); } 41 | 42 | #endif 43 | } 44 | 45 | /// 46 | /// Gets or sets the local position of the focus object as a vector2. 47 | /// 48 | public virtual Vector2 localPosition2D 49 | { 50 | #if GAMEEYE2D_XZ 51 | 52 | get { return new Vector2 (transform.localPosition.x, transform.localPosition.z);} 53 | set { transform.localPosition = new Vector3(value.x, transform.localPosition.y, value.y); } 54 | 55 | #else 56 | 57 | get { return new Vector2 (transform.localPosition.x, transform.localPosition.y);} 58 | set { transform.localPosition = new Vector3(value.x, value.y, transform.localPosition.z); } 59 | 60 | #endif 61 | } 62 | 63 | /// 64 | /// Gets or sets the influence of this focus on the Camera2D's action rect. 65 | /// This value is used to scale the focus point's offset from the camera. 66 | /// 67 | public virtual Vector2 influence 68 | { 69 | get { return m_Influence; } 70 | set { m_Influence = value; } 71 | } 72 | 73 | 74 | #if UNITY_EDITOR 75 | 76 | //Whether to draw debug data or not 77 | [SerializeField] bool m_DrawDebug = false; 78 | 79 | //The radius of the center sphere when drawing gizmo rectangles (the green and red rects that shows up in the scene when you select the camera) 80 | const float DRAW_ORIGIN_SIZE = 0.6f; 81 | 82 | 83 | //In the scene window draw the focus point 84 | void OnDrawGizmos () 85 | { 86 | if (m_DrawDebug) 87 | { 88 | Gizmos.color = Color.cyan; 89 | Gizmos.DrawSphere(GetFocusPoint(), DRAW_ORIGIN_SIZE); 90 | } 91 | } 92 | 93 | //When reset and a camera2D has auto add enabled, a focus will add itself to that camera2D's focus list when dragged into the scene. 94 | void Reset () 95 | { 96 | AddFocusToEveryAutoAddCamera2D(); 97 | } 98 | 99 | /// 100 | /// Adds the focus to every camera2D in the scene. 101 | /// Only works in the editor. 102 | /// 103 | [ContextMenu("Add Focus To Every Camera 2D")] 104 | protected void AddFocusToEveryCamera2D() 105 | { 106 | Camera2D[] camera2DArray = Object.FindObjectsOfType(); 107 | for (int i = 0; i < camera2DArray.Length; i++) 108 | { 109 | camera2DArray[i].AddFocus(this); 110 | } 111 | } 112 | 113 | /// 114 | /// Adds the focus to every camera2D in the scene with auto add enabled. 115 | /// Only works in the editor. 116 | /// 117 | [ContextMenu("Add Focus To Every Auto Add Camera 2D")] 118 | protected void AddFocusToEveryAutoAddCamera2D() 119 | { 120 | Camera2D[] camera2DArray = FindObjectsOfType(); 121 | if (camera2DArray.Length > 0) 122 | { 123 | for (int i = 0; i < camera2DArray.Length; i++) 124 | { 125 | if (camera2DArray[i].autoAddFocus) 126 | { 127 | camera2DArray[i].AddFocus(this); 128 | } 129 | } 130 | } 131 | } 132 | 133 | /// 134 | /// Remove the focus from every camera2D in the scene with auto add enabled. 135 | /// Only works in the editor. 136 | /// 137 | [ContextMenu("Remove Focus From Every Camera 2D")] 138 | protected void RemoveFocusFromEveryCamera2D() 139 | { 140 | Camera2D[] camera2DArray = Object.FindObjectsOfType(); 141 | for (int i = 0; i < camera2DArray.Length; i++) 142 | { 143 | camera2DArray[i].RemoveFocus(this); 144 | } 145 | } 146 | 147 | /// 148 | /// Remove the focus from every camera2D in the scene. 149 | /// Only works in the editor. 150 | /// 151 | [ContextMenu("Remove Focus From Every Auto Add Camera 2D")] 152 | protected void RemoveFocusFromEveryAutoAddCamera2D() 153 | { 154 | Camera2D[] camera2DArray = Object.FindObjectsOfType(); 155 | for (int i = 0; i < camera2DArray.Length; i++) 156 | { 157 | if (camera2DArray[i].autoAddFocus) 158 | { 159 | camera2DArray[i].RemoveFocus(this); 160 | } 161 | } 162 | } 163 | 164 | /// 165 | /// Sets the camera's local XY position to 0. If you haved defined GAMEEYE2D_XZ this will set XZ to 0 instead. 166 | /// Only works in the editor. 167 | /// 168 | [ContextMenu("Set Origin to (0, 0)")] 169 | protected void SetLocalPositionToZero() 170 | { 171 | localPosition2D = Vector2.zero; 172 | } 173 | 174 | /// 175 | /// Sets the camera's local XY position to 0. If you haved defined GAMEEYE2D_XZ this will set XZ to 0 instead. 176 | /// Only works in the editor. 177 | /// 178 | [ContextMenu("Set Rotation to Identity")] 179 | protected void SetLocalRotationToIdentity() 180 | { 181 | transform.localRotation = Quaternion.identity; 182 | } 183 | 184 | #endif 185 | } 186 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/Focus2D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd9adfac8a98e6d458b3c3be1de6d550 3 | timeCreated: 1475041854 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/FollowRail.cs: -------------------------------------------------------------------------------- 1 | /* Follow Rail v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// Creates a rail system when attached to an object that follows another focus. The focus point of the rail is the nearest position on the rail to that focus. 13 | /// 14 | [AddComponentMenu("GameEye2D/Focus2D/Follow Rail")] 15 | public class FollowRail : Rail 16 | { 17 | [SerializeField] Focus2D m_FollowedFocus; 18 | 19 | /// 20 | /// Gets or sets the focus the rail is following. 21 | /// 22 | public Focus2D followedFocus 23 | { 24 | get { return m_FollowedFocus; } 25 | set { m_FollowedFocus = value; } 26 | } 27 | 28 | 29 | /// 30 | /// Calculates the focus point along the rail. 31 | /// 32 | public override Vector2 GetFocusPoint() 33 | { 34 | if (m_FollowedFocus != null) 35 | { 36 | return ClampToCurve(m_FollowedFocus.GetFocusPoint()); 37 | } 38 | return position2D; 39 | } 40 | 41 | /// 42 | /// Calculates the nearest position along the curve to the given position. 43 | /// 44 | public Vector2 ClampToCurve (Vector2 position) 45 | { 46 | position = transform.InverseTransformPoint(position); 47 | 48 | //Get the nearest point 49 | int index = 0; 50 | float currentDistance = Vector2.Distance(position, m_Points[0]); 51 | float distance = currentDistance; 52 | for (int i = 1; i < length; i++) 53 | { 54 | currentDistance = Vector2.Distance(position, m_Points[i]); 55 | if (currentDistance < distance) 56 | { 57 | distance = currentDistance; 58 | index = i; 59 | } 60 | } 61 | 62 | //Clamp index to nearest curve 63 | if (index != 0) 64 | { 65 | if (index % 3 == 0) 66 | { 67 | if (length < index + 3 || Vector2.Distance(m_Points[index - 3], position) < Vector2.Distance(m_Points[index + 3], position)) 68 | { 69 | index -= 3; 70 | } 71 | } 72 | //Set the index to the start of the curve 73 | else 74 | { 75 | index = ((int)Mathf.Floor(index / 3)) * 3; 76 | } 77 | } 78 | 79 | //Calculate interpolation on that curve 80 | Vector2 difference = m_Points[index + 3] - m_Points[index]; 81 | Vector2 toPosition = position - m_Points[index]; 82 | float curveInterpolation; 83 | if (difference != Vector2.zero) 84 | { 85 | curveInterpolation = Mathf.Clamp01(Mathf.Cos(Vector2.Angle(difference, toPosition) * Mathf.Deg2Rad) * toPosition.magnitude / difference.magnitude); 86 | } 87 | else 88 | { 89 | curveInterpolation = 0.5f; 90 | } 91 | 92 | //Return the point along the curve 93 | return GetPoint (curveInterpolation, index); 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/FollowRail.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65fc2615c64d6b7498a1d3499c9a9b90 3 | timeCreated: 1478161881 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/FollowRailX.cs: -------------------------------------------------------------------------------- 1 | /* Follow Rail X v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// Creates a rail system when attached to an object that follows another focus. The focus point of the rail is the nearest position on the rail to the X coordinate of that focus. 13 | /// 14 | [AddComponentMenu("GameEye2D/Focus2D/Follow Rail X")] 15 | public class FollowRailX : FollowRail 16 | { 17 | /// 18 | /// Gets the point along the rail where the focus is. 19 | /// 20 | public override Vector2 GetFocusPoint() 21 | { 22 | if (followedFocus != null) 23 | { 24 | return ClampToCurveX(followedFocus.GetFocusPoint().x); 25 | } 26 | return position2D; 27 | } 28 | 29 | /// 30 | /// Gets the nearest position along the curve to the given x coordinate. 31 | /// 32 | public Vector2 ClampToCurveX(float position) 33 | { 34 | position = transform.InverseTransformPoint(new Vector2(position, 0f)).x; 35 | 36 | //Get the nearest point 37 | int index = 0; 38 | float distance = Mathf.Abs(position - m_Points[index].x); 39 | float closestDistance = distance; 40 | for (int i = 1; i < length; i++) 41 | { 42 | distance = Mathf.Abs(position - m_Points[i].x); 43 | if (distance < closestDistance) 44 | { 45 | closestDistance = distance; 46 | index = i; 47 | } 48 | } 49 | 50 | //Clamp index to nearest curve 51 | if (index != 0) 52 | { 53 | if (index % 3 == 0) 54 | { 55 | if (length < index + 3 || Mathf.Abs(m_Points[index - 3].x - position) < Mathf.Abs(m_Points[index + 3].x - position)) 56 | { 57 | index -= 3; 58 | } 59 | } 60 | //Set the index to the start of the curve 61 | else 62 | { 63 | index = ((int)Mathf.Floor(index / 3)) * 3; 64 | } 65 | } 66 | 67 | //Get how far along the curve the the given position is 68 | float startDistance = position - m_Points[index].x; 69 | float endDistance = position - m_Points[index + 3].x; 70 | float totalDistance = Mathf.Abs(m_Points[index + 3].x - m_Points[index].x); 71 | float curveInterpolation; 72 | if (totalDistance != 0f) 73 | { 74 | curveInterpolation = Mathf.Clamp01(0.5f + (startDistance + endDistance) / (totalDistance * 2f)); 75 | } 76 | else 77 | { 78 | curveInterpolation = 0.5f; 79 | } 80 | 81 | //Return the point along the curve 82 | return GetPoint(curveInterpolation, index); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/FollowRailX.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b64d63ced8f60246a34ae877739f5c3 3 | timeCreated: 1478162615 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/FollowRailY.cs: -------------------------------------------------------------------------------- 1 | /* Follow Rail Y v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// Creates a rail system when attached to an object that follows another focus. The focus point of the rail is the nearest position on the rail to the Y coordinate of that focus. 13 | /// 14 | [AddComponentMenu("GameEye2D/Focus2D/Follow Rail Y")] 15 | public class FollowRailY : FollowRail 16 | { 17 | /// 18 | /// Gets the point along the rail where the focus is. 19 | /// 20 | public override Vector2 GetFocusPoint() 21 | { 22 | if (followedFocus != null) 23 | { 24 | return ClampToCurveY(followedFocus.GetFocusPoint().y); 25 | } 26 | return position2D; 27 | } 28 | 29 | /// 30 | /// Gets the nearest position along the curve to the given y coordinate. 31 | /// 32 | public Vector2 ClampToCurveY(float position) 33 | { 34 | position = transform.InverseTransformPoint(new Vector2(0f, position)).y; 35 | 36 | //Get the nearest point 37 | int index = 0; 38 | float currentDistance = Mathf.Abs(position - m_Points[0].y); 39 | float distance = currentDistance; 40 | for (int i = 1; i < length; i++) 41 | { 42 | currentDistance = Mathf.Abs(position - m_Points[i].y); 43 | if (currentDistance < distance) 44 | { 45 | distance = currentDistance; 46 | index = i; 47 | } 48 | } 49 | 50 | //Clamp index to nearest curve 51 | if (index != 0) 52 | { 53 | if (index % 3 == 0) 54 | { 55 | if (length < index + 3 || Mathf.Abs(m_Points[index - 3].x - position) < Mathf.Abs(m_Points[index + 3].x - position)) 56 | { 57 | index -= 3; 58 | } 59 | } 60 | //Set the index to the start of the curve 61 | else 62 | { 63 | index = ((int)Mathf.Floor(index / 3)) * 3; 64 | } 65 | } 66 | 67 | //Get how far along the curve the the given position is 68 | float startDistance = position - m_Points[index].y; 69 | float endDistance = position - m_Points[index + 3].y; 70 | float totalDistance = Mathf.Abs(m_Points[index + 3].y - m_Points[index].y); 71 | float curveInterpolation; 72 | if (totalDistance != 0f) 73 | { 74 | curveInterpolation = Mathf.Clamp01(0.5f + (startDistance + endDistance) / (totalDistance * 2f)); 75 | } 76 | else 77 | { 78 | curveInterpolation = 0.5f; 79 | } 80 | 81 | //Return the point along the curve 82 | return GetPoint(curveInterpolation, index); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/FollowRailY.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47000b3b2a408d146be9211f8287c51d 3 | timeCreated: 1478162615 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/MouseCursor.cs: -------------------------------------------------------------------------------- 1 | /* Mouse Cursor v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// When attached to a camera, create a focus point that is at the position of the mouse cursor. 13 | /// 14 | [AddComponentMenu("GameEye2D/Focus2D/Mouse Cursor")] 15 | [RequireComponent(typeof(Camera2D))] 16 | public class MouseCursor : Focus2D 17 | { 18 | //The camera the mouse focus is based on. 19 | Camera m_Camera; 20 | 21 | //How far the mouse must be from the center of the screen (0-0.5) to return a value that is not the center of the screen. 22 | //This amount is reduced from camera's offset in view space from the center of the screen 23 | [SerializeField] float m_OffsetThreshold = 0.4f; 24 | 25 | //Half the view size is kept to calculate the reduction of the offset from the center of the screen 26 | Vector3 HALF_SCREEN_SIZE = new Vector3 (0.5f, 0.5f, 0); 27 | 28 | /// 29 | /// The camera the mouse focus is based on. 30 | /// 31 | public Camera gameCamera 32 | { 33 | get 34 | { 35 | if (m_Camera == null) 36 | { 37 | m_Camera = GetComponent(); 38 | } 39 | return m_Camera; 40 | } 41 | } 42 | 43 | 44 | /// 45 | /// A public function for the camera to use to find this object's point of interest. 46 | /// For a mouse cursor this is the mouse cursor's position on the screen reduced by the offset threshold from the center of the screen, and then put into world space. 47 | /// 48 | public override Vector2 GetFocusPoint () 49 | { 50 | //Calculate the offset the cursor is from the camera with the middle of the screen as the origin. 51 | Vector3 input = gameCamera.ScreenToViewportPoint(Input.mousePosition); 52 | Vector3 viewPos = new Vector3(Mathf.Clamp01(input.x), Mathf.Clamp01(input.y), input.z) - HALF_SCREEN_SIZE; 53 | Vector3 offsetFromCamera = Vector3.zero; 54 | if (viewPos.x != 0f) 55 | { 56 | offsetFromCamera.x = Mathf.Max((Mathf.Abs(viewPos.x) - m_OffsetThreshold), 0f) * (viewPos.x / Mathf.Abs(viewPos.x)); 57 | } 58 | if (viewPos.y != 0f) 59 | { 60 | offsetFromCamera.y = Mathf.Max((Mathf.Abs(viewPos.y) - m_OffsetThreshold), 0f) * (viewPos.y / Mathf.Abs(viewPos.y)); 61 | } 62 | 63 | //Calculate the point of interest in world space coordinates 64 | Vector3 worldPos = gameCamera.ViewportToWorldPoint(offsetFromCamera + HALF_SCREEN_SIZE); 65 | 66 | #if GAMEEYE2D_XZ 67 | 68 | return new Vector2(worldPos.x, worldPos.z); 69 | 70 | #else 71 | 72 | return new Vector2(worldPos.x, worldPos.y); 73 | 74 | #endif 75 | } 76 | 77 | 78 | #if UNITY_EDITOR 79 | 80 | //Offset threshold must be a value between 0 and 0.5 81 | const float MAX_THRESHOLD = 0.5f; 82 | void OnValidate () 83 | { 84 | m_OffsetThreshold = Mathf.Clamp(m_OffsetThreshold, 0f, MAX_THRESHOLD); 85 | } 86 | 87 | #endif 88 | } 89 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/MouseCursor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46105279c03312247a4f56bf5eeda1e7 3 | timeCreated: 1478162615 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/Rail.cs: -------------------------------------------------------------------------------- 1 | /* Rail v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | using System.Collections; 9 | using System; 10 | 11 | namespace GameEye2D.Focus 12 | { 13 | /// 14 | /// Creates a rail system when attached to an object. The class is abstract, and can be inherited from to create rail-based focus’s. 15 | /// 16 | public abstract class Rail : Focus2D 17 | { 18 | //The points that make the rail. 19 | [SerializeField] protected Vector2[] m_Points = new Vector2[] { new Vector2(-15f, 0f), new Vector2(-5f, 0f), new Vector2(5f, 0f), new Vector2(15f, 0f) }; 20 | 21 | 22 | /// 23 | /// The points that are used to calculate the rail’s bezier curve. 24 | /// Be careful with setting this value, as if the number of points is not 4, 7, 11, 14, etc... it is possible to make incomplete curves which can cause errors calculating the focus point. 25 | /// 26 | public Vector2[] points 27 | { 28 | get { return m_Points; } 29 | set { m_Points = value; } 30 | } 31 | 32 | /// 33 | /// Returns the number of curves in the rail. 34 | /// 35 | public int curveCount 36 | { 37 | get { return (m_Points.Length - 1) / 3; } 38 | } 39 | 40 | /// 41 | /// Returns the number of points in the rail. 42 | /// 43 | public int length 44 | { 45 | get { return m_Points.Length; } 46 | } 47 | 48 | /// 49 | /// Gets a point along a curve in the rail. 50 | /// 51 | public Vector2 GetPoint (float interpolation, int curve) 52 | { 53 | float oneMinusInterpolation = 1f - interpolation; 54 | return transform.TransformPoint ( oneMinusInterpolation * oneMinusInterpolation * oneMinusInterpolation * m_Points[curve] + 55 | 3f * oneMinusInterpolation * oneMinusInterpolation * interpolation * m_Points[curve + 1] + 56 | 3f * oneMinusInterpolation * interpolation * interpolation * m_Points[curve + 2] + 57 | interpolation * interpolation * interpolation * m_Points[curve + 3]); 58 | } 59 | 60 | 61 | #if UNITY_EDITOR 62 | 63 | /// 64 | /// If there are not 4, 7, 10, etc... points on the rail this function will add enough points to complete a curve. 65 | /// Only works in the editor. 66 | /// 67 | protected void ValidatePoints () 68 | { 69 | if (m_Points.Length == 0) 70 | { 71 | m_Points = new Vector2[] { new Vector2(-15f, 0f), new Vector2(-5f, 0f), new Vector2(5f, 0f), new Vector2(15f, 0f) }; 72 | } 73 | else 74 | { 75 | int pointsToAdd; 76 | if (m_Points.Length > 4) 77 | { 78 | pointsToAdd = 2 - (m_Points.Length + 1) % 3; 79 | } 80 | else 81 | { 82 | pointsToAdd = 4 - m_Points.Length; 83 | } 84 | 85 | if (pointsToAdd != 0) 86 | { 87 | int index = m_Points.Length - 1; 88 | Vector2 point = m_Points[index]; 89 | Array.Resize(ref m_Points, m_Points.Length + pointsToAdd); 90 | for (int i = index; i < m_Points.Length; i++) 91 | { 92 | point.x += 10f; 93 | m_Points[i] = point; 94 | } 95 | } 96 | } 97 | } 98 | void OnValidate() 99 | { 100 | ValidatePoints(); 101 | } 102 | 103 | #endif 104 | } 105 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/Rail.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d5d83c0b3282d04b8e4564e8e9eaad2 3 | timeCreated: 1474524912 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/SimpleMoving.cs: -------------------------------------------------------------------------------- 1 | /* Simple Moving v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// When attached to a transform, creates a focus point that is at the position of the transform. If the transform moves, the focus point leads ahead of it. The conversion from velocity to offset can be set through the inspector. 13 | /// 14 | [AddComponentMenu("GameEye2D/Focus2D/SimpleMoving")] 15 | public class SimpleMoving : F_Transform { 16 | 17 | //How much the camera looks ahead of where the transform is going 18 | [SerializeField] Vector2 m_VelocityToOffset = new Vector2 (0.6f, 0.1f); 19 | 20 | //Position and offset of the focus last frame 21 | Vector2 m_LastPosition2D = Vector2.zero; 22 | Vector2 m_Velocity = Vector2.zero; 23 | 24 | //Initialize the last position the transform was at. 25 | void Start () 26 | { 27 | m_LastPosition2D = position2D; 28 | } 29 | 30 | //Calculate the velocity of the transform 31 | void Update () 32 | { 33 | m_Velocity = (position2D - m_LastPosition2D) / Time.deltaTime; 34 | m_LastPosition2D = position2D; 35 | } 36 | 37 | /// 38 | /// Calculates a position that is ahead of the focus’s transform, in the direction the transform it moving. 39 | /// 40 | public override Vector2 GetFocusPoint () 41 | { 42 | return base.GetFocusPoint() + new Vector2(m_Velocity.x * m_VelocityToOffset.x, m_Velocity.y * m_VelocityToOffset.y); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/SimpleMoving.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea7fdca1ed6205c4b804511d3024801e 3 | timeCreated: 1478162616 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/TimedRail.cs: -------------------------------------------------------------------------------- 1 | /* Timed Rail v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// Creates a rail system when attached to an object. 13 | /// The focus point of the rail starts at the front and moves along the rail until it reaches the end. 14 | /// If looping is enabled through the inspector then the rail will start over once it reaches the end. 15 | /// Can be paused by disabling it. 16 | /// 17 | [AddComponentMenu("GameEye2D/Focus2D/Timed Rail")] 18 | [ExecuteInEditMode] 19 | public class TimedRail : Rail 20 | { 21 | //How long it will take to move along the rail 22 | [SerializeField] float m_TimeToFinish = 10f; 23 | 24 | //Where the focus is along the rail 25 | [SerializeField] float m_StartInterpolation = 0f; 26 | 27 | //If the rail should start at the beginning when it completes 28 | [SerializeField] bool m_Loop; 29 | 30 | 31 | /// 32 | /// How far the focus is along the rail. Clamped between 0 and 1. 33 | /// If you want to reset the rail to the beginning. You can set this value to 0. 34 | /// 35 | public float interpolation 36 | { 37 | get { return m_StartInterpolation; } 38 | set { m_StartInterpolation = Mathf.Clamp01(value); } 39 | } 40 | 41 | /// 42 | /// How long it takes for the rail to move from one end to the other. 43 | /// 44 | public float timeToFinish 45 | { 46 | get { return m_TimeToFinish; } 47 | set { m_TimeToFinish = Mathf.Max(m_TimeToFinish, 0.0001f); } 48 | } 49 | 50 | 51 | //Each frame 52 | void Update() 53 | { 54 | #if UNITY_EDITOR 55 | 56 | //While auto scale time is enabled in the editor, when the rail grows so does it time it takes to reach the end. 57 | if (!Application.isPlaying) 58 | { 59 | if (m_AutoScaleTime) 60 | { 61 | float change = ((float)length) / ((float)m_LastNumberOfPoints); 62 | if (change != 1f) 63 | { 64 | m_TimeToFinish *= change; 65 | } 66 | if (m_LastNumberOfPoints != length) 67 | { 68 | m_LastNumberOfPoints = length; 69 | } 70 | } 71 | } 72 | else 73 | { 74 | 75 | #endif 76 | //Move further along the rail. 77 | if (interpolation < 1f) 78 | { 79 | interpolation += Time.deltaTime / m_TimeToFinish; 80 | 81 | //If enabled, loop the rail back to the beginning 82 | if (m_Loop && interpolation == 1f) 83 | { 84 | interpolation = 0f; 85 | } 86 | } 87 | #if UNITY_EDITOR 88 | } 89 | #endif 90 | } 91 | 92 | /// 93 | /// Gets the point along the rail where the focus is. 94 | /// 95 | public override Vector2 GetFocusPoint() 96 | { 97 | //Determine which curve the focus point is on 98 | int currentCurve; 99 | float curveInterpolation = interpolation; 100 | if (curveInterpolation == 1f) 101 | { 102 | currentCurve = length - 4; 103 | } 104 | else 105 | { 106 | curveInterpolation *= curveCount; 107 | currentCurve = (int)Mathf.Floor(curveInterpolation); 108 | curveInterpolation -= currentCurve; 109 | currentCurve *= 3; 110 | } 111 | 112 | return GetPoint(curveInterpolation, currentCurve); 113 | } 114 | 115 | #if UNITY_EDITOR 116 | 117 | //If the rail getting addition points scales the rail timer to match 118 | [SerializeField] bool m_AutoScaleTime = true; 119 | int m_LastNumberOfPoints = 4; 120 | 121 | 122 | //Make sure there are always 4, 7, 10, etc points on the rail to avoid errors 123 | void OnValidate() 124 | { 125 | ValidatePoints(); 126 | m_StartInterpolation = Mathf.Clamp01(m_StartInterpolation); 127 | m_TimeToFinish = Mathf.Max(m_TimeToFinish, 0.0001f); 128 | } 129 | 130 | #endif 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/TimedRail.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efecd06cccb007345a7853304e072df0 3 | timeCreated: 1478162617 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/TimedTrigger.cs: -------------------------------------------------------------------------------- 1 | /* Timed Trigger v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | using System.Collections; 9 | 10 | namespace GameEye2D.Focus 11 | { 12 | /// 13 | /// When attached to a transform with a trigger collider or collider2D, creates a focus that adds itself to the focus list of camera2Ds when an object with a certain tag enters the collider after a delay. There is an option for the camera2Ds to remove the focus when the trigger collider is exited. 14 | /// 15 | [AddComponentMenu("GameEye2D/Focus2D/Timed Trigger")] 16 | public class TimedTrigger : Trigger 17 | { 18 | //How long it takes for the trigger to activate 19 | [SerializeField] float m_TimeToActivate = 0f; 20 | float m_ActivationTimer = -1f; 21 | 22 | 23 | //The timer to activate 24 | void Update () 25 | { 26 | //Check if the timer has expired 27 | if (m_ActivationTimer > 0f) 28 | { 29 | m_ActivationTimer -= Time.deltaTime; 30 | if (m_ActivationTimer <= 0f) 31 | { 32 | //If the trigger does not have enough objects inside, remove the focus from the camera2D 33 | if (m_TriggerExitsToBeRemoved < m_MinimumInsideTrigger) 34 | { 35 | for (int i = 0; i < m_Camera2Ds.Length; i++) 36 | { 37 | if (m_Camera2Ds[i] != null) 38 | { 39 | m_Camera2Ds[i].RemoveFocus(this); 40 | } 41 | } 42 | } 43 | //If the trigger has enough objects inside, add the focus to the camera2D 44 | else 45 | { 46 | for (int i = 0; i < m_Camera2Ds.Length; i++) 47 | { 48 | if (m_Camera2Ds[i] != null) 49 | { 50 | m_Camera2Ds[i].AddFocus(this); 51 | } 52 | } 53 | } 54 | } 55 | } 56 | } 57 | 58 | /// 59 | /// Adds the focus to each of the camera2d's provided through the inspector after a delay. 60 | /// 61 | public override void Activate () 62 | { 63 | if (!m_Triggered) 64 | { 65 | m_Triggered = true; 66 | if (m_TimeToActivate == 0f) 67 | { 68 | for (int i = 0; i < m_Camera2Ds.Length; i++) 69 | { 70 | if (m_Camera2Ds[i] != null) 71 | { 72 | m_Camera2Ds[i].AddFocus(this); 73 | } 74 | } 75 | } 76 | else if (m_ActivationTimer > 0f) 77 | { 78 | m_ActivationTimer = -1f; 79 | } 80 | else 81 | { 82 | m_ActivationTimer = m_TimeToActivate; 83 | } 84 | } 85 | } 86 | 87 | /// 88 | /// Removes the focus from the camera2d's it is added to after a delay. 89 | /// 90 | public override void Undo () 91 | { 92 | if (m_Triggered) 93 | { 94 | m_Triggered = false; 95 | m_TriggerExitsToBeRemoved = m_MinimumInsideTrigger - 1; 96 | if (m_TimeToActivate == 0f) 97 | { 98 | for (int i = 0; i < m_Camera2Ds.Length; i++) 99 | { 100 | if (m_Camera2Ds[i] != null) 101 | { 102 | m_Camera2Ds[i].RemoveFocus(this); 103 | } 104 | } 105 | } 106 | else if (m_ActivationTimer > 0f) 107 | { 108 | m_ActivationTimer = -1f; 109 | } 110 | else 111 | { 112 | m_ActivationTimer = m_TimeToActivate; 113 | } 114 | } 115 | } 116 | } 117 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/TimedTrigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4624d53637fe39a43833e531dd087937 3 | timeCreated: 1478162615 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/Trigger.cs: -------------------------------------------------------------------------------- 1 | /* Trigger v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | using System.Collections; 9 | 10 | namespace GameEye2D.Focus 11 | { 12 | /// 13 | /// When attached to a transform with a trigger collider or collider2D, creates a focus that adds itself to the focus list of camera2Ds when an object with a certain tag enters the collider. There is an option for the camera2Ds to remove the focus when the trigger collider is exited. 14 | /// 15 | [AddComponentMenu("GameEye2D/Focus2D/Trigger")] 16 | public class Trigger : F_Transform 17 | { 18 | //The camera2D's that will add and remove the focus from a focus list. 19 | [SerializeField] protected Camera2D[] m_Camera2Ds; 20 | 21 | //The tag of an object that will cause this focus point to be added to the camera 22 | [SerializeField] string m_TagThatTriggers = "Player"; 23 | 24 | //The amount of objects with that tag that must be inside the trigger to add it to the focus list 25 | [SerializeField] protected int m_MinimumInsideTrigger = 1; 26 | 27 | //Causes the focus to be removed when the trigger is exited 28 | [SerializeField] bool m_RemoveOnExit = false; 29 | 30 | //Storing if the focus has been triggered 31 | protected int m_TriggerExitsToBeRemoved = 0; 32 | protected bool m_Triggered = false; 33 | 34 | 35 | /// 36 | /// The camera2D's that will add and remove the focus from a focus list. 37 | /// 38 | public Camera2D[] camera2Ds 39 | { 40 | get { return m_Camera2Ds; } 41 | set { m_Camera2Ds = value; } 42 | } 43 | 44 | 45 | //When a collider is entered by the trigger object, this position is added to each camera2d's focus list. 46 | void OnTriggerEnter2D (Collider2D collider2D) 47 | { 48 | if (collider2D.tag == m_TagThatTriggers && m_Camera2Ds != null && m_Camera2Ds.Length != 0) 49 | { 50 | m_TriggerExitsToBeRemoved++; 51 | if (m_TriggerExitsToBeRemoved == m_MinimumInsideTrigger) 52 | { 53 | Activate(); 54 | } 55 | } 56 | } 57 | void OnTriggerEnter(Collider collider) 58 | { 59 | if (collider.tag == m_TagThatTriggers && m_Camera2Ds != null && m_Camera2Ds.Length != 0) 60 | { 61 | m_TriggerExitsToBeRemoved++; 62 | if (m_TriggerExitsToBeRemoved == m_MinimumInsideTrigger) 63 | { 64 | Activate(); 65 | } 66 | } 67 | } 68 | 69 | //When collider is exited by the trigger object and few other objects with that tag are inside, this position is removed from each camera2d's focus list. 70 | void OnTriggerExit2D (Collider2D collider2D) 71 | { 72 | if (m_RemoveOnExit && collider2D.tag == m_TagThatTriggers) 73 | { 74 | m_TriggerExitsToBeRemoved = Mathf.Max(m_TriggerExitsToBeRemoved--, 0); 75 | if (m_TriggerExitsToBeRemoved < m_MinimumInsideTrigger) 76 | { 77 | Undo(); 78 | } 79 | } 80 | } 81 | void OnTriggerExit (Collider collider) 82 | { 83 | if (m_RemoveOnExit && collider.tag == m_TagThatTriggers) 84 | { 85 | m_TriggerExitsToBeRemoved = Mathf.Max(m_TriggerExitsToBeRemoved--, 0); 86 | if (m_TriggerExitsToBeRemoved < m_MinimumInsideTrigger) 87 | { 88 | Undo(); 89 | } 90 | } 91 | } 92 | 93 | /// 94 | /// Adds the focus to each of the camera2d's provided through the inspector. 95 | /// 96 | public virtual void Activate () 97 | { 98 | if (!m_Triggered) 99 | { 100 | m_Triggered = true; 101 | for (int i = 0; i < m_Camera2Ds.Length; i++) 102 | { 103 | if (m_Camera2Ds[i] != null) 104 | { 105 | m_Camera2Ds[i].AddFocus(this); 106 | } 107 | } 108 | } 109 | } 110 | 111 | /// 112 | /// Removes the focus from the camera2d's it is added to when triggered. 113 | /// 114 | public virtual void Undo () 115 | { 116 | if (m_Triggered) 117 | { 118 | m_Triggered = false; 119 | m_TriggerExitsToBeRemoved = m_MinimumInsideTrigger - 1; 120 | for (int i = 0; i < m_Camera2Ds.Length; i++) 121 | { 122 | if (m_Camera2Ds[i] != null) 123 | { 124 | m_Camera2Ds[i].RemoveFocus(this); 125 | } 126 | } 127 | } 128 | } 129 | 130 | 131 | #if UNITY_EDITOR 132 | 133 | //When a value is changed in the editor, make sure that the minimum inside the trigger is greater than 1. 134 | void OnValidate () 135 | { 136 | m_MinimumInsideTrigger = Mathf.Max(m_MinimumInsideTrigger, 1); 137 | } 138 | 139 | #endif 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/Trigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffc03c470d67b3e4b82462ded754eca8 3 | timeCreated: 1478162617 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/WorldCursor.cs: -------------------------------------------------------------------------------- 1 | /* World Cursor v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | using GameEye2D.Focus; 9 | 10 | namespace GameEye2D.Focus 11 | { 12 | /// 13 | /// When added to a transform, creatures a focus that moves that transform based on the movement of two input axis (by default mouse X and Y). The axis that moves the transform can be set through the inspector. 14 | /// 15 | [AddComponentMenu("GameEye2D/Focus2D/World Cursor")] 16 | public class WorldCursor : F_Transform 17 | { 18 | //The camera the mouse focus is based on. 19 | [SerializeField] Camera m_Camera; 20 | 21 | //How much the cursor moves based on the input 22 | [SerializeField] float m_Sensitivity = 1f; 23 | 24 | //The input that moves the cursor 25 | [SerializeField] string m_X_Input = "Mouse X"; 26 | [SerializeField] string m_Y_Input = "Mouse Y"; 27 | 28 | 29 | /// 30 | /// Gets or sets the camera the mouse focus is based on. 31 | /// 32 | public Camera gameCamera 33 | { 34 | get 35 | { 36 | if (m_Camera == null) 37 | { 38 | gameCamera = Camera.main; 39 | if (m_Camera == null) 40 | { 41 | enabled = false; 42 | } 43 | } 44 | return m_Camera; 45 | } 46 | set { m_Camera = value; } 47 | } 48 | 49 | /// 50 | /// How much the transform of the focus moves to follow the input. 51 | /// 52 | public float sensitivity 53 | { 54 | get { return m_Sensitivity; } 55 | set { m_Sensitivity = value; } 56 | } 57 | 58 | /// 59 | /// The input from the two axis. 60 | /// 61 | protected Vector2 input 62 | { 63 | get { return new Vector2(Input.GetAxis(m_X_Input), Input.GetAxis(m_Y_Input)) * sensitivity; } 64 | } 65 | 66 | 67 | //Hide the real cursor and set this cursors starting position 68 | void Start () 69 | { 70 | Cursor.visible = false; 71 | 72 | if (gameCamera != null) 73 | { 74 | Vector3 worldPos = gameCamera.ScreenToWorldPoint(Input.mousePosition); 75 | 76 | #if GAMEEYE2D_XZ 77 | position2D = new Vector2(worldPos.x, worldPos.z); 78 | #else 79 | position2D = new Vector2(worldPos.x, worldPos.y); 80 | #endif 81 | } 82 | } 83 | 84 | 85 | //Move the transform based on the input axis 86 | void Update () 87 | { 88 | position2D += input; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/WorldCursor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ef2f6cfa41ba69478bff465a7a63a74 3 | timeCreated: 1478162615 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/WorldCursorLimited.cs: -------------------------------------------------------------------------------- 1 | /* World Cursor Limited v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | namespace GameEye2D.Focus 10 | { 11 | /// 12 | /// When added to a transform, creatures a focus that moves that transform based on the movement of two input axis (by default mouse X and Y) and leashes it to not be farther away from the transform’s parent than the leash distance. The axis that moves the transform can be set through the inspector. 13 | /// 14 | [AddComponentMenu("GameEye2D/Focus2D/World Cursor Limited")] 15 | public class WorldCursorLimited : WorldCursor 16 | { 17 | //How far the cursor can be from this transform's parent 18 | [SerializeField] float m_LeashDistance = 10f; 19 | 20 | 21 | //Move the transform based on the input axis 22 | void Update () 23 | { 24 | position2D += input; 25 | localPosition2D = localPosition2D.normalized * Mathf.Min(localPosition2D.magnitude, m_LeashDistance); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Focuses/WorldCursorLimited.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01e4d60260cf8fa4c983c02fdb42a2f9 3 | timeCreated: 1478162614 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea48cb1d0e35fa24dad2a2cb7a6ed340 3 | folderAsset: yes 4 | timeCreated: 1481121083 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/ClampToScreen.cs: -------------------------------------------------------------------------------- 1 | /* ClampToScreen v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | 9 | /// 10 | /// When attached to a transform with a renderer, the transform’s position will become clamped to remain within an orthographic camera view. 11 | /// For the smoothest movement I suggest setting this script's execution order to after all camera movement has completed. 12 | /// 13 | [AddComponentMenu("GameEye2D/Tools/Clamp To Screen")] 14 | [RequireComponent(typeof(Renderer))] 15 | public class ClampToScreen : MonoBehaviour { 16 | 17 | //The camera that the object will be clamped within the view of 18 | [SerializeField] Camera m_Camera; 19 | 20 | //The renderer of the object to keep on screen 21 | Renderer m_Renderer; 22 | 23 | //What axis to clamp 24 | enum Axis 25 | { 26 | XY = 0, 27 | X, 28 | Y 29 | } 30 | [SerializeField] Axis m_AxisToClamp = Axis.XY; 31 | 32 | 33 | /// 34 | /// Gets or sets the camera that the mesh will be clamped to the view of 35 | /// 36 | public Camera gameCamera 37 | { 38 | get { return m_Camera; } 39 | set { m_Camera = value; } 40 | } 41 | 42 | 43 | //Initialize by getting the object's renderer 44 | void Start () 45 | { 46 | m_Renderer = GetComponent(); 47 | } 48 | 49 | //If there is no screen, do nothing 50 | void OnEnable () 51 | { 52 | if (gameCamera == null) 53 | { 54 | enabled = false; 55 | #if UNITY_EDITOR 56 | Debug.LogError(CAMERA_IS_NULL); 57 | #endif 58 | } 59 | } 60 | 61 | //After the objects have all moved, clamp the object to the screen 62 | void LateUpdate() 63 | { 64 | switch (m_AxisToClamp) 65 | { 66 | case Axis.X: 67 | transform.position = new Vector3 (Camera2D.ClampToCameraView(gameCamera, m_Renderer.bounds).x, transform.position.y, transform.position.z); 68 | break; 69 | case Axis.Y: 70 | #if GAMEEYE2D_XZ 71 | transform.position = new Vector3 (transform.position.x, transform.position.y, Camera2D.ClampToCameraView(gameCamera, m_Renderer.bounds).z); 72 | #else 73 | transform.position = new Vector3 (transform.position.x, Camera2D.ClampToCameraView(gameCamera, m_Renderer.bounds).y, transform.position.z); 74 | #endif 75 | break; 76 | 77 | //In any other state (including XY or an error), clamp both X and Y axis. 78 | default: 79 | transform.position = Camera2D.ClampToCameraView(gameCamera, m_Renderer.bounds); 80 | break; 81 | } 82 | } 83 | 84 | 85 | #if UNITY_EDITOR 86 | 87 | //Error messages 88 | const string CAMERA_IS_NULL = "Camera is null."; 89 | 90 | //When first put into the editor or the reset button is hit, the tool sets the camera to the main camera. 91 | void Reset () 92 | { 93 | Camera mainCamera = Camera.main; 94 | if (mainCamera != null) 95 | { 96 | gameCamera = mainCamera; 97 | } 98 | } 99 | 100 | #endif 101 | } 102 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/ClampToScreen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d11b2d3db8db6ca4aaf44f171b239827 3 | timeCreated: 1479551417 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 200 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/Parallax.cs: -------------------------------------------------------------------------------- 1 | /* Parallax v1.0 2 | * 3 | * Created by Jason Hein 4 | * 5 | * 6 | * Moves an object based on the main camera's movements. 7 | * 8 | * Due to moving the object in the scene this will not work for split screen games, instead use shaders to reproduce a parallax effect differently on each camera. 9 | */ 10 | 11 | 12 | using UnityEngine; 13 | 14 | /// 15 | /// When attached to a transform, the transform’s position will move to follow the camera. How much influence the camera’s movement has on the transform can be changed to give the parallax effect. 16 | /// 17 | [AddComponentMenu("GameEye2D/Tools/Parallax")] 18 | public class Parallax : MonoBehaviour { 19 | 20 | //The camera transform that this object's position is based on 21 | [SerializeField] Transform m_CameraTransform; 22 | 23 | //How much the transform will be moved by the movement of the camera. 24 | [SerializeField] Vector2 m_Influence = new Vector2(0.25f, 0.25f); 25 | 26 | //Store the original position to reset to and the last position of the camera 27 | Vector3 m_OriginalPosition; 28 | Vector3 m_OriginalCameraPosition; 29 | 30 | //How fast the object moves to match the camera 31 | const float LERP_SPEED_PRE_DELTA = 20f; 32 | 33 | 34 | /// 35 | /// Gets or sets the camera transform that the transform's position is based off of. 36 | /// 37 | public Transform cameraTransform 38 | { 39 | get { 40 | if (m_CameraTransform == null) 41 | { 42 | Camera cam = Camera.main; 43 | if (cam != null) 44 | { 45 | cameraTransform = cam.transform; 46 | } 47 | else 48 | { 49 | enabled = false; 50 | Destroy(this); 51 | #if UNITY_EDITOR 52 | Debug.LogError(NO_CAMERA); 53 | #endif 54 | } 55 | } 56 | return m_CameraTransform; 57 | } 58 | set { 59 | m_CameraTransform = value; 60 | m_OriginalCameraPosition = value.position; 61 | m_OriginalPosition = transform.position; 62 | } 63 | } 64 | 65 | /// 66 | /// Gets or sets the influence of this focus on the Camera2D's action bounds. 67 | /// 68 | /// The influence. 69 | public virtual Vector2 influence 70 | { 71 | get { return m_Influence;} 72 | set { m_Influence = value; } 73 | } 74 | 75 | /// 76 | /// Gets the parallax position. 77 | /// 78 | public Vector3 parallaxPosition 79 | { 80 | get 81 | { 82 | #if GAMEEYE2D_XZ 83 | return m_OriginalPosition + Vector3.Scale((cameraTransform.position - m_OriginalCameraPosition), new Vector3(influence.x, 0f, influence.y)); 84 | #else 85 | return m_OriginalPosition + Vector3.Scale((cameraTransform.position - m_OriginalCameraPosition), new Vector3(influence.x, influence.y, 0f)); 86 | #endif 87 | } 88 | } 89 | 90 | void Awake () 91 | { 92 | if (cameraTransform != null) 93 | { 94 | m_OriginalPosition = transform.position; 95 | m_OriginalCameraPosition = cameraTransform.position; 96 | } 97 | } 98 | 99 | //When this component enabled set its position to where the object would be based on the camera 100 | void OnEnable() 101 | { 102 | if (cameraTransform != null) 103 | { 104 | transform.position = parallaxPosition; 105 | } 106 | else 107 | { 108 | enabled = false; 109 | } 110 | } 111 | 112 | //The parallax layer only updates if it is visible 113 | void OnBecameVisible() 114 | { 115 | enabled = true; 116 | } 117 | void OnBecameInvisible() 118 | { 119 | enabled = false; 120 | } 121 | 122 | //On each frame if the camera has moved, move the camera according to how influenced it is by the camera's position. 123 | void Update () 124 | { 125 | transform.position = Vector3.Lerp( transform.position, 126 | parallaxPosition, 127 | Mathf.Min(LERP_SPEED_PRE_DELTA * Time.deltaTime, 1f)); 128 | } 129 | 130 | 131 | #if UNITY_EDITOR 132 | 133 | //Whether to draw debug data or not 134 | [SerializeField] bool m_DrawDebug = false; 135 | 136 | //Error messages 137 | const string NO_CAMERA = "Parralaxing error. No camera in the scene."; 138 | 139 | //In the scene window draw the line between the original position and the current position 140 | void OnDrawGizmos () 141 | { 142 | if (m_DrawDebug && Application.isPlaying) 143 | { 144 | Gizmos.color = Color.grey; 145 | Gizmos.DrawLine(m_OriginalPosition, transform.position); 146 | } 147 | } 148 | 149 | /// 150 | /// When first put into the editor or the reset button is hit, the tool sets the camera to the main camera. 151 | /// Only works in the editor. 152 | /// 153 | public void Reset () 154 | { 155 | Camera mainCamera = Camera.main; 156 | if (mainCamera != null) 157 | { 158 | cameraTransform = mainCamera.transform; 159 | } 160 | } 161 | 162 | #endif 163 | } -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/Parallax.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78fabd40e8bb8a44a918c1bb4062eca7 3 | timeCreated: 1473926103 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/TriggerCameraLimits.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5eeb88f3410746242a949eff5843d345 3 | timeCreated: 1473834409 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/TriggerCameras.cs: -------------------------------------------------------------------------------- 1 | /* Trigger Cameras v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | using System.Collections; 9 | 10 | /// 11 | /// When attached to a transform with a trigger collider, when that collider is entered certain camera’s will be enabled, and others disabled. You can choose which cameras are enabled or disabled. 12 | /// 13 | [AddComponentMenu("GameEye2D/Tools/Trigger Cameras")] 14 | public class TriggerCameras : MonoBehaviour { 15 | 16 | //The camera2D that will have its focus list changed 17 | [SerializeField] Camera[] m_EnabledCameras; 18 | [SerializeField] Camera[] m_DisabledCameras; 19 | 20 | //The tag of an object that will cause the focus list to be changed when it enters a trigger collider on this object 21 | [SerializeField] string m_TagThatTriggers = "Player"; 22 | 23 | //If the camera's change back when the collider is exited 24 | [SerializeField] bool m_UndoOnExit = false; 25 | 26 | 27 | //When entered by the right object, the camera's change 28 | void OnTriggerEnter2D(Collider2D collider2D) 29 | { 30 | if (collider2D.tag == m_TagThatTriggers) 31 | { 32 | Activate(); 33 | } 34 | } 35 | void OnTriggerEnter(Collider collider) 36 | { 37 | if (collider.tag == m_TagThatTriggers) 38 | { 39 | Activate(); 40 | } 41 | } 42 | 43 | //When exited by the right object, the camera's change 44 | void OnTriggerExit2D(Collider2D collider2D) 45 | { 46 | if (m_UndoOnExit && collider2D.tag == m_TagThatTriggers) 47 | { 48 | Undo(); 49 | } 50 | } 51 | void OnTriggerExit(Collider collider) 52 | { 53 | if (m_UndoOnExit && collider.tag == m_TagThatTriggers) 54 | { 55 | Undo(); 56 | } 57 | } 58 | 59 | /// 60 | /// Causes the changes of cameras. 61 | /// 62 | public void Activate() 63 | { 64 | //Disable camera's 65 | if (m_DisabledCameras != null) 66 | { 67 | for (int i = 0; i < m_DisabledCameras.Length; i++) 68 | { 69 | if (m_DisabledCameras[i] != null) 70 | { 71 | m_DisabledCameras[i].enabled = false; 72 | } 73 | } 74 | } 75 | 76 | //Enabled camera's 77 | if (m_EnabledCameras != null) 78 | { 79 | for (int i = 0; i < m_EnabledCameras.Length; i++) 80 | { 81 | if (m_EnabledCameras[i] != null) 82 | { 83 | m_EnabledCameras[i].enabled = true; 84 | } 85 | } 86 | } 87 | } 88 | 89 | /// 90 | /// Undoes the change of cameras. 91 | /// 92 | public void Undo() 93 | { 94 | //Enabled camera's are disabled 95 | if (m_EnabledCameras != null) 96 | { 97 | for (int i = 0; i < m_EnabledCameras.Length; i++) 98 | { 99 | if (m_EnabledCameras[i] != null) 100 | { 101 | m_EnabledCameras[i].enabled = false; 102 | } 103 | } 104 | } 105 | 106 | //Disable camera's are enabled 107 | if (m_DisabledCameras != null) 108 | { 109 | for (int i = 0; i < m_DisabledCameras.Length; i++) 110 | { 111 | if (m_DisabledCameras[i] != null) 112 | { 113 | m_DisabledCameras[i].enabled = true; 114 | } 115 | } 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/TriggerCameras.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f28f2404154a8844a5b1112ac4947aa 3 | timeCreated: 1476870062 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/TriggerFocusList.cs: -------------------------------------------------------------------------------- 1 | /* Trigger Focus List v1.0 2 | * 3 | * Created by Jason Hein 4 | * 5 | */ 6 | 7 | 8 | using UnityEngine; 9 | using System.Collections; 10 | using GameEye2D.Focus; 11 | 12 | /// 13 | /// When attached to a transform with a trigger collider, when that collider is entered the focus list of a Camera2D is changed to a new list. 14 | /// 15 | [AddComponentMenu("GameEye2D/Tools/Trigger Focus List")] 16 | public class TriggerFocusList : MonoBehaviour { 17 | 18 | //The camera2D that will have its focus list changed 19 | [SerializeField] Camera2D m_Camera2D; 20 | 21 | //The new focus list 22 | [SerializeField] Focus2D[] m_NewFocusList; 23 | 24 | //The tag of an object that will cause the focus list to be changed when it enters a trigger collider on this object 25 | [SerializeField] string m_TagThatTriggers = "Player"; 26 | 27 | 28 | //When entered by the right object, the list changes 29 | void OnTriggerEnter2D(Collider2D collider2D) 30 | { 31 | if (collider2D.tag == m_TagThatTriggers) 32 | { 33 | Activate(); 34 | } 35 | } 36 | void OnTriggerEnter(Collider collider) 37 | { 38 | if (collider.tag == m_TagThatTriggers) 39 | { 40 | Activate(); 41 | } 42 | } 43 | 44 | /// 45 | /// Causes the change of the focus list to the given focus2D array. 46 | /// 47 | public void Activate() 48 | { 49 | //Check if the camera2D exists. 50 | if (m_Camera2D == null) 51 | { 52 | #if UNITY_EDITOR 53 | Debug.LogError(CAMERA_IS_NULL); 54 | #endif 55 | return; 56 | } 57 | 58 | m_Camera2D.ClearFocusList(); 59 | m_Camera2D.AddFocus(m_NewFocusList); 60 | } 61 | 62 | 63 | #if UNITY_EDITOR 64 | 65 | //Error messages 66 | const string CAMERA_IS_NULL = "Trigger Change Focus List Error: Camera2D is null."; 67 | 68 | /// 69 | /// When first put into the editor or the reset button is hit, the tool sets the camera to the main camera. 70 | /// Only works in the editor. 71 | /// 72 | public void Reset () 73 | { 74 | Camera mainCamera = Camera.main; 75 | if (mainCamera != null) 76 | { 77 | m_Camera2D = mainCamera.GetComponent(); 78 | } 79 | } 80 | 81 | #endif 82 | } 83 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/TriggerFocusList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45f2c53f8cad06f4c89e9a8f078f7e77 3 | timeCreated: 1475052621 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Core/Tools/TriggerZoom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22ce1d5a52005864089231b9cc2e1aa6 3 | timeCreated: 1475053316 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33aca2aa0db2f484aa4f998af707094d 3 | folderAsset: yes 4 | timeCreated: 1475826030 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea81991381868d24193f6c974a070447 3 | folderAsset: yes 4 | timeCreated: 1480063381 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Arena.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5f9e6731c7ddbd4e82dffa1129f98e2 3 | timeCreated: 1477734302 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Follow Rail Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010549463204} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010549463204 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000011331892594} 22 | - component: {fileID: 114000010348948876} 23 | m_Layer: 0 24 | m_Name: Follow Rail Focus2D 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000011331892594 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000010549463204} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114000010348948876 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000010549463204} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 65fc2615c64d6b7498a1d3499c9a9b90, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | m_Influence: {x: 1, y: 1} 55 | m_DrawDebug: 0 56 | m_Points: 57 | - {x: -15, y: 0} 58 | - {x: -5, y: 0} 59 | - {x: 5, y: 0} 60 | - {x: 15, y: 0} 61 | m_FollowedFocus: {fileID: 0} 62 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Follow Rail Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a6a6ea768f49e548b63734738db6c5d 3 | timeCreated: 1477553309 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Follow X Rail Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010798925848} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010798925848 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012492928606} 22 | - component: {fileID: 114000012029688196} 23 | m_Layer: 0 24 | m_Name: Follow X Rail Focus2D 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000012492928606 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000010798925848} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114000012029688196 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000010798925848} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 1b64d63ced8f60246a34ae877739f5c3, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | m_Influence: {x: 1, y: 1} 55 | m_DrawDebug: 0 56 | m_Points: 57 | - {x: -15, y: 0} 58 | - {x: -5, y: 0} 59 | - {x: 5, y: 0} 60 | - {x: 15, y: 0} 61 | m_FollowedFocus: {fileID: 0} 62 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Follow X Rail Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c39c6a4cfa2e43d4f82700554b5ce8cd 3 | timeCreated: 1477553346 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Follow Y Rail Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010868464962} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010868464962 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012733301752} 22 | - component: {fileID: 114000011415476280} 23 | m_Layer: 0 24 | m_Name: Follow Y Rail Focus2D 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000012733301752 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000010868464962} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114000011415476280 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000010868464962} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 47000b3b2a408d146be9211f8287c51d, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | m_Influence: {x: 1, y: 1} 55 | m_DrawDebug: 0 56 | m_Points: 57 | - {x: -15, y: 0} 58 | - {x: -5, y: 0} 59 | - {x: 5, y: 0} 60 | - {x: 15, y: 0} 61 | m_FollowedFocus: {fileID: 0} 62 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Follow Y Rail Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a6b29a09eee3c144ac15f6922f629b9 3 | timeCreated: 1477553374 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Game Camera.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010447285618} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010447285618 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012549155042} 22 | - component: {fileID: 20000013677022344} 23 | - component: {fileID: 124000010477439080} 24 | - component: {fileID: 92000011429308800} 25 | - component: {fileID: 81000011155117148} 26 | - component: {fileID: 114000012680800022} 27 | m_Layer: 0 28 | m_Name: Game Camera 29 | m_TagString: Untagged 30 | m_Icon: {fileID: 0} 31 | m_NavMeshLayer: 0 32 | m_StaticEditorFlags: 0 33 | m_IsActive: 1 34 | --- !u!4 &4000012549155042 35 | Transform: 36 | m_ObjectHideFlags: 1 37 | m_PrefabParentObject: {fileID: 0} 38 | m_PrefabInternal: {fileID: 100100000} 39 | m_GameObject: {fileID: 1000010447285618} 40 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 41 | m_LocalPosition: {x: 0, y: 0, z: 0} 42 | m_LocalScale: {x: 1, y: 1, z: 1} 43 | m_Children: [] 44 | m_Father: {fileID: 0} 45 | m_RootOrder: 0 46 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 47 | --- !u!20 &20000013677022344 48 | Camera: 49 | m_ObjectHideFlags: 1 50 | m_PrefabParentObject: {fileID: 0} 51 | m_PrefabInternal: {fileID: 100100000} 52 | m_GameObject: {fileID: 1000010447285618} 53 | m_Enabled: 1 54 | serializedVersion: 2 55 | m_ClearFlags: 1 56 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 57 | m_NormalizedViewPortRect: 58 | serializedVersion: 2 59 | x: 0 60 | y: 0 61 | width: 1 62 | height: 1 63 | near clip plane: 0.3 64 | far clip plane: 1000 65 | field of view: 60 66 | orthographic: 1 67 | orthographic size: 5 68 | m_Depth: 0 69 | m_CullingMask: 70 | serializedVersion: 2 71 | m_Bits: 4294967295 72 | m_RenderingPath: -1 73 | m_TargetTexture: {fileID: 0} 74 | m_TargetDisplay: 0 75 | m_TargetEye: 3 76 | m_HDR: 0 77 | m_AllowMSAA: 1 78 | m_ForceIntoRT: 0 79 | m_OcclusionCulling: 1 80 | m_StereoConvergence: 10 81 | m_StereoSeparation: 0.022 82 | m_StereoMirrorMode: 0 83 | --- !u!81 &81000011155117148 84 | AudioListener: 85 | m_ObjectHideFlags: 1 86 | m_PrefabParentObject: {fileID: 0} 87 | m_PrefabInternal: {fileID: 100100000} 88 | m_GameObject: {fileID: 1000010447285618} 89 | m_Enabled: 1 90 | --- !u!92 &92000011429308800 91 | Behaviour: 92 | m_ObjectHideFlags: 1 93 | m_PrefabParentObject: {fileID: 0} 94 | m_PrefabInternal: {fileID: 100100000} 95 | m_GameObject: {fileID: 1000010447285618} 96 | m_Enabled: 1 97 | --- !u!114 &114000012680800022 98 | MonoBehaviour: 99 | m_ObjectHideFlags: 1 100 | m_PrefabParentObject: {fileID: 0} 101 | m_PrefabInternal: {fileID: 100100000} 102 | m_GameObject: {fileID: 1000010447285618} 103 | m_Enabled: 1 104 | m_EditorHideFlags: 0 105 | m_Script: {fileID: 11500000, guid: b9c99bf64ac69e947a7b7f4faf6a8e1f, type: 3} 106 | m_Name: 107 | m_EditorClassIdentifier: 108 | m_FocusList: [] 109 | m_ActionRectSpaceAdded: 12 110 | m_CameraLimits: 111 | serializedVersion: 2 112 | x: -500 113 | y: -500 114 | width: 1000 115 | height: 1000 116 | m_DrawDebug: 0 117 | m_AutoAddFocus: 0 118 | --- !u!124 &124000010477439080 119 | Behaviour: 120 | m_ObjectHideFlags: 1 121 | m_PrefabParentObject: {fileID: 0} 122 | m_PrefabInternal: {fileID: 100100000} 123 | m_GameObject: {fileID: 1000010447285618} 124 | m_Enabled: 1 125 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Game Camera.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89e403400e9073249a897d769681d203 3 | timeCreated: 1477731710 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Keep Mesh on Screen.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000011361838728} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000011361838728 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000011429229926} 22 | - component: {fileID: 114000012354177830} 23 | - component: {fileID: 23000011575662124} 24 | m_Layer: 0 25 | m_Name: Keep Mesh on Screen 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000011429229926 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000011361838728} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!23 &23000011575662124 45 | MeshRenderer: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000011361838728} 50 | m_Enabled: 1 51 | m_CastShadows: 1 52 | m_ReceiveShadows: 1 53 | m_MotionVectors: 1 54 | m_LightProbeUsage: 1 55 | m_ReflectionProbeUsage: 1 56 | m_Materials: 57 | - {fileID: 0} 58 | m_StaticBatchInfo: 59 | firstSubMesh: 0 60 | subMeshCount: 0 61 | m_StaticBatchRoot: {fileID: 0} 62 | m_ProbeAnchor: {fileID: 0} 63 | m_LightProbeVolumeOverride: {fileID: 0} 64 | m_ScaleInLightmap: 1 65 | m_PreserveUVs: 0 66 | m_IgnoreNormalsForChartDetection: 0 67 | m_ImportantGI: 0 68 | m_SelectedEditorRenderState: 3 69 | m_MinimumChartSize: 4 70 | m_AutoUVMaxDistance: 0.5 71 | m_AutoUVMaxAngle: 89 72 | m_LightmapParameters: {fileID: 0} 73 | m_SortingLayerID: 0 74 | m_SortingLayer: 0 75 | m_SortingOrder: 0 76 | --- !u!114 &114000012354177830 77 | MonoBehaviour: 78 | m_ObjectHideFlags: 1 79 | m_PrefabParentObject: {fileID: 0} 80 | m_PrefabInternal: {fileID: 100100000} 81 | m_GameObject: {fileID: 1000011361838728} 82 | m_Enabled: 1 83 | m_EditorHideFlags: 0 84 | m_Script: {fileID: 11500000, guid: d11b2d3db8db6ca4aaf44f171b239827, type: 3} 85 | m_Name: 86 | m_EditorClassIdentifier: 87 | m_Camera: {fileID: 0} 88 | m_AxisToClamp: 0 89 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Keep Mesh on Screen.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13c67f8491c35b14b97a6a627b23880e 3 | timeCreated: 1477646392 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Parralax.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000013980385352} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000013980385352 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000011835896688} 22 | - component: {fileID: 114000011409428468} 23 | m_Layer: 0 24 | m_Name: Parralax 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000011835896688 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000013980385352} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114000011409428468 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000013980385352} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 78fabd40e8bb8a44a918c1bb4062eca7, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | m_CameraTransform: {fileID: 0} 55 | m_Influence: {x: 0.25, y: 0.25} 56 | m_DrawDebug: 0 57 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Parralax.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9028e02337b63044491b3722e4e311dd 3 | timeCreated: 1477721693 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Platformer.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 126c28bbfc470da4a95c79cbcc0850e8 3 | timeCreated: 1477733968 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/RigidyBody Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000012304853812} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000012304853812 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000010870950536} 22 | - component: {fileID: 50000012204009566} 23 | - component: {fileID: 114000010653698940} 24 | m_Layer: 0 25 | m_Name: RigidyBody Focus2D 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000010870950536 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000012304853812} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!50 &50000012204009566 45 | Rigidbody2D: 46 | serializedVersion: 4 47 | m_ObjectHideFlags: 1 48 | m_PrefabParentObject: {fileID: 0} 49 | m_PrefabInternal: {fileID: 100100000} 50 | m_GameObject: {fileID: 1000012304853812} 51 | m_BodyType: 0 52 | m_Simulated: 1 53 | m_UseFullKinematicContacts: 0 54 | m_UseAutoMass: 0 55 | m_Mass: 1 56 | m_LinearDrag: 0 57 | m_AngularDrag: 0.05 58 | m_GravityScale: 1 59 | m_Material: {fileID: 0} 60 | m_Interpolate: 1 61 | m_SleepingMode: 1 62 | m_CollisionDetection: 0 63 | m_Constraints: 0 64 | --- !u!114 &114000010653698940 65 | MonoBehaviour: 66 | m_ObjectHideFlags: 1 67 | m_PrefabParentObject: {fileID: 0} 68 | m_PrefabInternal: {fileID: 100100000} 69 | m_GameObject: {fileID: 1000012304853812} 70 | m_Enabled: 1 71 | m_EditorHideFlags: 0 72 | m_Script: {fileID: 11500000, guid: 2f32f7a82f0df5b489bb9cf56cb6fddb, type: 3} 73 | m_Name: 74 | m_EditorClassIdentifier: 75 | m_Influence: {x: 1, y: 1} 76 | m_DrawDebug: 0 77 | m_Offset: {x: 0, y: 0} 78 | m_VelocityToOffset: {x: 0.6, y: 0.6} 79 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/RigidyBody Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebd36579f0cfb6148889e98d7c8df51a 3 | timeCreated: 1477384396 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/RigidyBody2D Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000011337854628} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000011337854628 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000010842255310} 22 | - component: {fileID: 50000011937351518} 23 | - component: {fileID: 114000012289185640} 24 | m_Layer: 0 25 | m_Name: RigidyBody2D Focus2D 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000010842255310 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000011337854628} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!50 &50000011937351518 45 | Rigidbody2D: 46 | serializedVersion: 4 47 | m_ObjectHideFlags: 1 48 | m_PrefabParentObject: {fileID: 0} 49 | m_PrefabInternal: {fileID: 100100000} 50 | m_GameObject: {fileID: 1000011337854628} 51 | m_BodyType: 0 52 | m_Simulated: 1 53 | m_UseFullKinematicContacts: 0 54 | m_UseAutoMass: 0 55 | m_Mass: 1 56 | m_LinearDrag: 0 57 | m_AngularDrag: 0.05 58 | m_GravityScale: 1 59 | m_Material: {fileID: 0} 60 | m_Interpolate: 1 61 | m_SleepingMode: 1 62 | m_CollisionDetection: 0 63 | m_Constraints: 0 64 | --- !u!114 &114000012289185640 65 | MonoBehaviour: 66 | m_ObjectHideFlags: 1 67 | m_PrefabParentObject: {fileID: 0} 68 | m_PrefabInternal: {fileID: 100100000} 69 | m_GameObject: {fileID: 1000011337854628} 70 | m_Enabled: 1 71 | m_EditorHideFlags: 0 72 | m_Script: {fileID: 11500000, guid: c5ef66453f88bfc45919e47b06ff9f19, type: 3} 73 | m_Name: 74 | m_EditorClassIdentifier: 75 | m_Influence: {x: 1, y: 1} 76 | m_DrawDebug: 0 77 | m_Offset: {x: 0, y: 0} 78 | m_VelocityToOffset: {x: 0.6, y: 0.6} 79 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/RigidyBody2D Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 953280ca0ceef3c44809d5bd198f39eb 3 | timeCreated: 1477384436 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Role Playing Game.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea80e80904da0de4e8556aa86a034cf8 3 | timeCreated: 1477983293 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Runner.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c1975c6a0c13574c9bee266622138be 3 | timeCreated: 1477733171 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Shoot Em Up.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91f42e03b3693344d857fa02ba49e5ba 3 | timeCreated: 1477737384 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Simple Moving Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000013313443884} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000013313443884 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000010830110286} 22 | - component: {fileID: 114000012174040262} 23 | - component: {fileID: 61000014126512364} 24 | m_Layer: 0 25 | m_Name: Simple Moving Focus2D 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000010830110286 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000013313443884} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!61 &61000014126512364 45 | BoxCollider2D: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000013313443884} 50 | m_Enabled: 1 51 | m_Density: 1 52 | m_Material: {fileID: 0} 53 | m_IsTrigger: 0 54 | m_UsedByEffector: 0 55 | m_UsedByComposite: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_SpriteTilingProperty: 58 | border: {x: 0, y: 0, z: 0, w: 0} 59 | pivot: {x: 0, y: 0} 60 | oldSize: {x: 0, y: 0} 61 | newSize: {x: 0, y: 0} 62 | adaptiveTilingThreshold: 0 63 | drawMode: 0 64 | adaptiveTiling: 0 65 | m_AutoTiling: 0 66 | serializedVersion: 2 67 | m_Size: {x: 1, y: 1} 68 | m_EdgeRadius: 0 69 | --- !u!114 &114000012174040262 70 | MonoBehaviour: 71 | m_ObjectHideFlags: 1 72 | m_PrefabParentObject: {fileID: 0} 73 | m_PrefabInternal: {fileID: 100100000} 74 | m_GameObject: {fileID: 1000013313443884} 75 | m_Enabled: 1 76 | m_EditorHideFlags: 0 77 | m_Script: {fileID: 11500000, guid: ea7fdca1ed6205c4b804511d3024801e, type: 3} 78 | m_Name: 79 | m_EditorClassIdentifier: 80 | m_Influence: {x: 1, y: 1} 81 | m_DrawDebug: 0 82 | m_Offset: {x: 0, y: 0} 83 | m_VelocityToOffset: {x: 0.6, y: 0.6} 84 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Simple Moving Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4aa8c7b9301f3d547a2718d74f3ebc48 3 | timeCreated: 1477384488 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Strategy Cam2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010429849464} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010429849464 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000010816949050} 22 | - component: {fileID: 20000010175016632} 23 | - component: {fileID: 124000011592255538} 24 | - component: {fileID: 92000012792720484} 25 | - component: {fileID: 81000011757451394} 26 | - component: {fileID: 114000013506649132} 27 | - component: {fileID: 114000010018634750} 28 | - component: {fileID: 114000010150838432} 29 | - component: {fileID: 114000013820761002} 30 | m_Layer: 0 31 | m_Name: Strategy Cam2D 32 | m_TagString: MainCamera 33 | m_Icon: {fileID: 0} 34 | m_NavMeshLayer: 0 35 | m_StaticEditorFlags: 0 36 | m_IsActive: 1 37 | --- !u!4 &4000010816949050 38 | Transform: 39 | m_ObjectHideFlags: 1 40 | m_PrefabParentObject: {fileID: 0} 41 | m_PrefabInternal: {fileID: 100100000} 42 | m_GameObject: {fileID: 1000010429849464} 43 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 44 | m_LocalPosition: {x: 0, y: 0, z: 0} 45 | m_LocalScale: {x: 1, y: 1, z: 1} 46 | m_Children: [] 47 | m_Father: {fileID: 0} 48 | m_RootOrder: 0 49 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 50 | --- !u!20 &20000010175016632 51 | Camera: 52 | m_ObjectHideFlags: 1 53 | m_PrefabParentObject: {fileID: 0} 54 | m_PrefabInternal: {fileID: 100100000} 55 | m_GameObject: {fileID: 1000010429849464} 56 | m_Enabled: 1 57 | serializedVersion: 2 58 | m_ClearFlags: 1 59 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 60 | m_NormalizedViewPortRect: 61 | serializedVersion: 2 62 | x: 0 63 | y: 0 64 | width: 1 65 | height: 1 66 | near clip plane: 0.3 67 | far clip plane: 1000 68 | field of view: 60 69 | orthographic: 1 70 | orthographic size: 15 71 | m_Depth: 0 72 | m_CullingMask: 73 | serializedVersion: 2 74 | m_Bits: 4294967295 75 | m_RenderingPath: -1 76 | m_TargetTexture: {fileID: 0} 77 | m_TargetDisplay: 0 78 | m_TargetEye: 3 79 | m_HDR: 0 80 | m_AllowMSAA: 1 81 | m_ForceIntoRT: 0 82 | m_OcclusionCulling: 1 83 | m_StereoConvergence: 10 84 | m_StereoSeparation: 0.022 85 | m_StereoMirrorMode: 0 86 | --- !u!81 &81000011757451394 87 | AudioListener: 88 | m_ObjectHideFlags: 1 89 | m_PrefabParentObject: {fileID: 0} 90 | m_PrefabInternal: {fileID: 100100000} 91 | m_GameObject: {fileID: 1000010429849464} 92 | m_Enabled: 1 93 | --- !u!92 &92000012792720484 94 | Behaviour: 95 | m_ObjectHideFlags: 1 96 | m_PrefabParentObject: {fileID: 0} 97 | m_PrefabInternal: {fileID: 100100000} 98 | m_GameObject: {fileID: 1000010429849464} 99 | m_Enabled: 1 100 | --- !u!114 &114000010018634750 101 | MonoBehaviour: 102 | m_ObjectHideFlags: 1 103 | m_PrefabParentObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | m_GameObject: {fileID: 1000010429849464} 106 | m_Enabled: 1 107 | m_EditorHideFlags: 0 108 | m_Script: {fileID: 11500000, guid: 98743c09acee7944e95d799fce1cfccd, type: 3} 109 | m_Name: 110 | m_EditorClassIdentifier: 111 | --- !u!114 &114000010150838432 112 | MonoBehaviour: 113 | m_ObjectHideFlags: 1 114 | m_PrefabParentObject: {fileID: 0} 115 | m_PrefabInternal: {fileID: 100100000} 116 | m_GameObject: {fileID: 1000010429849464} 117 | m_Enabled: 1 118 | m_EditorHideFlags: 0 119 | m_Script: {fileID: 11500000, guid: 1787ca55586a83f47a54824aba75e89f, type: 3} 120 | m_Name: 121 | m_EditorClassIdentifier: 122 | m_MinimumZoom: 5 123 | m_MaxZoom: 20 124 | m_ScrollInput: Mouse ScrollWheel 125 | --- !u!114 &114000013506649132 126 | MonoBehaviour: 127 | m_ObjectHideFlags: 1 128 | m_PrefabParentObject: {fileID: 0} 129 | m_PrefabInternal: {fileID: 100100000} 130 | m_GameObject: {fileID: 1000010429849464} 131 | m_Enabled: 1 132 | m_EditorHideFlags: 0 133 | m_Script: {fileID: 11500000, guid: b9c99bf64ac69e947a7b7f4faf6a8e1f, type: 3} 134 | m_Name: 135 | m_EditorClassIdentifier: 136 | m_FocusList: 137 | - {fileID: 0} 138 | m_ActionRectSpaceAdded: 12 139 | m_CameraLimits: 140 | serializedVersion: 2 141 | x: -500 142 | y: -500 143 | width: 1000 144 | height: 1000 145 | m_DrawDebug: 0 146 | m_AutoAddFocus: 0 147 | --- !u!114 &114000013820761002 148 | MonoBehaviour: 149 | m_ObjectHideFlags: 1 150 | m_PrefabParentObject: {fileID: 0} 151 | m_PrefabInternal: {fileID: 100100000} 152 | m_GameObject: {fileID: 1000010429849464} 153 | m_Enabled: 1 154 | m_EditorHideFlags: 0 155 | m_Script: {fileID: 11500000, guid: 46105279c03312247a4f56bf5eeda1e7, type: 3} 156 | m_Name: 157 | m_EditorClassIdentifier: 158 | m_Influence: {x: 0.5, y: 0.5} 159 | m_DrawDebug: 0 160 | m_OffsetThreshold: 0.45 161 | --- !u!124 &124000011592255538 162 | Behaviour: 163 | m_ObjectHideFlags: 1 164 | m_PrefabParentObject: {fileID: 0} 165 | m_PrefabInternal: {fileID: 100100000} 166 | m_GameObject: {fileID: 1000010429849464} 167 | m_Enabled: 1 168 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Strategy Cam2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93dc76061eba2e044af8f559c347b1bf 3 | timeCreated: 1477392362 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Timed Rail Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000012506256412} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000012506256412 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012540853710} 22 | - component: {fileID: 114000010749450606} 23 | m_Layer: 0 24 | m_Name: Timed Rail Focus2D 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000012540853710 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000012506256412} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114000010749450606 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000012506256412} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: efecd06cccb007345a7853304e072df0, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | m_Influence: {x: 1, y: 1} 55 | m_DrawDebug: 0 56 | m_Points: 57 | - {x: -15, y: 0} 58 | - {x: -5, y: 0} 59 | - {x: 5, y: 0} 60 | - {x: 15, y: 0} 61 | m_TimeToFinish: 10 62 | m_StartInterpolation: 0 63 | m_Loop: 0 64 | m_AutoScaleTime: 1 65 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Timed Rail Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c486f1b7aeaa4e74c8ad58cdaa35d5f0 3 | timeCreated: 1477384307 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Timed Trigger Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000013326091248} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000013326091248 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000011762476580} 22 | - component: {fileID: 61000010910844718} 23 | - component: {fileID: 114000012565075060} 24 | m_Layer: 0 25 | m_Name: Timed Trigger Focus2D 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000011762476580 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000013326091248} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!61 &61000010910844718 45 | BoxCollider2D: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000013326091248} 50 | m_Enabled: 1 51 | m_Density: 1 52 | m_Material: {fileID: 0} 53 | m_IsTrigger: 1 54 | m_UsedByEffector: 0 55 | m_UsedByComposite: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_SpriteTilingProperty: 58 | border: {x: 0, y: 0, z: 0, w: 0} 59 | pivot: {x: 0, y: 0} 60 | oldSize: {x: 0, y: 0} 61 | newSize: {x: 0, y: 0} 62 | adaptiveTilingThreshold: 0 63 | drawMode: 0 64 | adaptiveTiling: 0 65 | m_AutoTiling: 0 66 | serializedVersion: 2 67 | m_Size: {x: 1, y: 1} 68 | m_EdgeRadius: 0 69 | --- !u!114 &114000012565075060 70 | MonoBehaviour: 71 | m_ObjectHideFlags: 1 72 | m_PrefabParentObject: {fileID: 0} 73 | m_PrefabInternal: {fileID: 100100000} 74 | m_GameObject: {fileID: 1000013326091248} 75 | m_Enabled: 1 76 | m_EditorHideFlags: 0 77 | m_Script: {fileID: 11500000, guid: 4624d53637fe39a43833e531dd087937, type: 3} 78 | m_Name: 79 | m_EditorClassIdentifier: 80 | m_Influence: {x: 1, y: 1} 81 | m_DrawDebug: 0 82 | m_Offset: {x: 0, y: 0} 83 | m_Camera2Ds: [] 84 | m_TagThatTriggers: Player 85 | m_MinimumInsideTrigger: 1 86 | m_RemoveOnExit: 0 87 | m_TimeToActivate: 0 88 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Timed Trigger Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 986cc4a10e8c3104aa4b2ce0b8fe1cd3 3 | timeCreated: 1477384539 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Transform Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010966699808} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010966699808 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012625616028} 22 | - component: {fileID: 114000013629596130} 23 | m_Layer: 0 24 | m_Name: Transform Focus2D 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000012625616028 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000010966699808} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: -10} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114000013629596130 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000010966699808} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 807f8d2bf0831224f8b2f509fa2f073f, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | m_Influence: {x: 1, y: 1} 55 | m_DrawDebug: 0 56 | m_Offset: {x: 0, y: 0} 57 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Transform Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfac83008d261704fb94fe759952c74b 3 | timeCreated: 1477642598 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Camera Limits.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000012978679460} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000012978679460 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000014130678932} 22 | - component: {fileID: 114000011798733290} 23 | - component: {fileID: 61000011729814322} 24 | m_Layer: 0 25 | m_Name: Trigger Camera Limits 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000014130678932 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000012978679460} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!61 &61000011729814322 45 | BoxCollider2D: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000012978679460} 50 | m_Enabled: 1 51 | m_Density: 1 52 | m_Material: {fileID: 0} 53 | m_IsTrigger: 1 54 | m_UsedByEffector: 0 55 | m_UsedByComposite: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_SpriteTilingProperty: 58 | border: {x: 0, y: 0, z: 0, w: 0} 59 | pivot: {x: 0, y: 0} 60 | oldSize: {x: 0, y: 0} 61 | newSize: {x: 0, y: 0} 62 | adaptiveTilingThreshold: 0 63 | drawMode: 0 64 | adaptiveTiling: 0 65 | m_AutoTiling: 0 66 | serializedVersion: 2 67 | m_Size: {x: 1, y: 1} 68 | m_EdgeRadius: 0 69 | --- !u!114 &114000011798733290 70 | MonoBehaviour: 71 | m_ObjectHideFlags: 1 72 | m_PrefabParentObject: {fileID: 0} 73 | m_PrefabInternal: {fileID: 100100000} 74 | m_GameObject: {fileID: 1000012978679460} 75 | m_Enabled: 1 76 | m_EditorHideFlags: 0 77 | m_Script: {fileID: 11500000, guid: 5eeb88f3410746242a949eff5843d345, type: 3} 78 | m_Name: 79 | m_EditorClassIdentifier: 80 | m_Camera2D: {fileID: 0} 81 | m_TagThatTriggers: Player 82 | m_CameraLimits: 83 | serializedVersion: 2 84 | x: -500 85 | y: -500 86 | width: 1000 87 | height: 1000 88 | m_TransitionTime: 0 89 | m_DrawDebug: 0 90 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Camera Limits.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e158f3ec07138cf4b8fdc8a4362c2ec3 3 | timeCreated: 1477646613 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Cameras.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010761953864} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010761953864 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012044988850} 22 | - component: {fileID: 114000014102831846} 23 | - component: {fileID: 61000014047345962} 24 | m_Layer: 0 25 | m_Name: Trigger Cameras 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000012044988850 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000010761953864} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!61 &61000014047345962 45 | BoxCollider2D: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000010761953864} 50 | m_Enabled: 1 51 | m_Density: 1 52 | m_Material: {fileID: 0} 53 | m_IsTrigger: 1 54 | m_UsedByEffector: 0 55 | m_UsedByComposite: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_SpriteTilingProperty: 58 | border: {x: 0, y: 0, z: 0, w: 0} 59 | pivot: {x: 0, y: 0} 60 | oldSize: {x: 0, y: 0} 61 | newSize: {x: 0, y: 0} 62 | adaptiveTilingThreshold: 0 63 | drawMode: 0 64 | adaptiveTiling: 0 65 | m_AutoTiling: 0 66 | serializedVersion: 2 67 | m_Size: {x: 1, y: 1} 68 | m_EdgeRadius: 0 69 | --- !u!114 &114000014102831846 70 | MonoBehaviour: 71 | m_ObjectHideFlags: 1 72 | m_PrefabParentObject: {fileID: 0} 73 | m_PrefabInternal: {fileID: 100100000} 74 | m_GameObject: {fileID: 1000010761953864} 75 | m_Enabled: 1 76 | m_EditorHideFlags: 0 77 | m_Script: {fileID: 11500000, guid: 6f28f2404154a8844a5b1112ac4947aa, type: 3} 78 | m_Name: 79 | m_EditorClassIdentifier: 80 | m_EnabledCameras: [] 81 | m_DisabledCameras: [] 82 | m_TagThatTriggers: Player 83 | m_UndoOnExit: 0 84 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Cameras.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5639f891f2a71a408aea15f42bdeb57 3 | timeCreated: 1477646636 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Focus List.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010973583842} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010973583842 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000013611162188} 22 | - component: {fileID: 114000011316798036} 23 | - component: {fileID: 61000010974756166} 24 | m_Layer: 0 25 | m_Name: Trigger Focus List 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000013611162188 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000010973583842} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!61 &61000010974756166 45 | BoxCollider2D: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000010973583842} 50 | m_Enabled: 1 51 | m_Density: 1 52 | m_Material: {fileID: 0} 53 | m_IsTrigger: 1 54 | m_UsedByEffector: 0 55 | m_UsedByComposite: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_SpriteTilingProperty: 58 | border: {x: 0, y: 0, z: 0, w: 0} 59 | pivot: {x: 0, y: 0} 60 | oldSize: {x: 0, y: 0} 61 | newSize: {x: 0, y: 0} 62 | adaptiveTilingThreshold: 0 63 | drawMode: 0 64 | adaptiveTiling: 0 65 | m_AutoTiling: 0 66 | serializedVersion: 2 67 | m_Size: {x: 1, y: 1} 68 | m_EdgeRadius: 0 69 | --- !u!114 &114000011316798036 70 | MonoBehaviour: 71 | m_ObjectHideFlags: 1 72 | m_PrefabParentObject: {fileID: 0} 73 | m_PrefabInternal: {fileID: 100100000} 74 | m_GameObject: {fileID: 1000010973583842} 75 | m_Enabled: 1 76 | m_EditorHideFlags: 0 77 | m_Script: {fileID: 11500000, guid: 45f2c53f8cad06f4c89e9a8f078f7e77, type: 3} 78 | m_Name: 79 | m_EditorClassIdentifier: 80 | m_Camera2D: {fileID: 0} 81 | m_NewFocusList: [] 82 | m_TagThatTriggers: Player 83 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Focus List.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3b3fd9ba41819a47ae867688d7c139a 3 | timeCreated: 1477646668 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010215164118} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010215164118 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012014408036} 22 | - component: {fileID: 114000013350153194} 23 | - component: {fileID: 61000011973479314} 24 | m_Layer: 0 25 | m_Name: Trigger Focus2D 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000012014408036 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000010215164118} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!61 &61000011973479314 45 | BoxCollider2D: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000010215164118} 50 | m_Enabled: 1 51 | m_Density: 1 52 | m_Material: {fileID: 0} 53 | m_IsTrigger: 1 54 | m_UsedByEffector: 0 55 | m_UsedByComposite: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_SpriteTilingProperty: 58 | border: {x: 0, y: 0, z: 0, w: 0} 59 | pivot: {x: 0, y: 0} 60 | oldSize: {x: 0, y: 0} 61 | newSize: {x: 0, y: 0} 62 | adaptiveTilingThreshold: 0 63 | drawMode: 0 64 | adaptiveTiling: 0 65 | m_AutoTiling: 0 66 | serializedVersion: 2 67 | m_Size: {x: 1, y: 1} 68 | m_EdgeRadius: 0 69 | --- !u!114 &114000013350153194 70 | MonoBehaviour: 71 | m_ObjectHideFlags: 1 72 | m_PrefabParentObject: {fileID: 0} 73 | m_PrefabInternal: {fileID: 100100000} 74 | m_GameObject: {fileID: 1000010215164118} 75 | m_Enabled: 1 76 | m_EditorHideFlags: 0 77 | m_Script: {fileID: 11500000, guid: ffc03c470d67b3e4b82462ded754eca8, type: 3} 78 | m_Name: 79 | m_EditorClassIdentifier: 80 | m_Influence: {x: 1, y: 1} 81 | m_DrawDebug: 0 82 | m_Offset: {x: 0, y: 0} 83 | m_Camera2Ds: [] 84 | m_TagThatTriggers: Player 85 | m_MinimumInsideTrigger: 1 86 | m_RemoveOnExit: 0 87 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f650b47fa792f3a4ebe503b03003b911 3 | timeCreated: 1477394986 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Zoom.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000013620819214} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000013620819214 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012095563858} 22 | - component: {fileID: 114000012251198856} 23 | - component: {fileID: 61000011755287342} 24 | m_Layer: 0 25 | m_Name: Trigger Zoom 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000012095563858 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000013620819214} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!61 &61000011755287342 45 | BoxCollider2D: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000013620819214} 50 | m_Enabled: 1 51 | m_Density: 1 52 | m_Material: {fileID: 0} 53 | m_IsTrigger: 1 54 | m_UsedByEffector: 0 55 | m_UsedByComposite: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_SpriteTilingProperty: 58 | border: {x: 0, y: 0, z: 0, w: 0} 59 | pivot: {x: 0, y: 0} 60 | oldSize: {x: 0, y: 0} 61 | newSize: {x: 0, y: 0} 62 | adaptiveTilingThreshold: 0 63 | drawMode: 0 64 | adaptiveTiling: 0 65 | m_AutoTiling: 0 66 | serializedVersion: 2 67 | m_Size: {x: 1, y: 1} 68 | m_EdgeRadius: 0 69 | --- !u!114 &114000012251198856 70 | MonoBehaviour: 71 | m_ObjectHideFlags: 1 72 | m_PrefabParentObject: {fileID: 0} 73 | m_PrefabInternal: {fileID: 100100000} 74 | m_GameObject: {fileID: 1000013620819214} 75 | m_Enabled: 1 76 | m_EditorHideFlags: 0 77 | m_Script: {fileID: 11500000, guid: 22ce1d5a52005864089231b9cc2e1aa6, type: 3} 78 | m_Name: 79 | m_EditorClassIdentifier: 80 | m_Camera2D: {fileID: 0} 81 | m_TagThatTriggers: Player 82 | m_EnterZoom: 5 83 | m_ExitZoom: 5 84 | m_TransitionTime: 0 85 | m_DrawDebug: 0 86 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/Trigger Zoom.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46ac54d328003cb43ae6018c90ed0e17 3 | timeCreated: 1477646732 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/World Cursor Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000011292299118} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000011292299118 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000010139223766} 22 | - component: {fileID: 114000012298335492} 23 | m_Layer: 0 24 | m_Name: World Cursor Focus2D 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000010139223766 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000011292299118} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114000012298335492 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000011292299118} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 1ef2f6cfa41ba69478bff465a7a63a74, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | m_Influence: {x: 1, y: 1} 55 | m_DrawDebug: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_Camera: {fileID: 0} 58 | m_Sensitivity: 1 59 | m_X_Input: Mouse X 60 | m_Y_Input: Mouse Y 61 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/World Cursor Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db35eb76ca7e96f498b3034ed040b75c 3 | timeCreated: 1477384836 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/World Cursor Limited Focus2D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000014175899756} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000014175899756 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000012571075860} 22 | - component: {fileID: 114000011211276978} 23 | m_Layer: 0 24 | m_Name: World Cursor Limited Focus2D 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000012571075860 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000014175899756} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114000011211276978 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000014175899756} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 01e4d60260cf8fa4c983c02fdb42a2f9, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | m_Influence: {x: 1, y: 1} 55 | m_DrawDebug: 0 56 | m_Offset: {x: 0, y: 0} 57 | m_Camera: {fileID: 0} 58 | m_Sensitivity: 1 59 | m_X_Input: Mouse X 60 | m_Y_Input: Mouse Y 61 | m_LeashDistance: 10 62 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Resources/World Cursor Limited Focus2D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56b4779c2a8daba42b5b05b957c95073 3 | timeCreated: 1477635941 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e83506a62b3c204b81d1f89c7ba8e4a 3 | folderAsset: yes 4 | timeCreated: 1481122172 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Scripts/GameEye2DMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eadc16830c6748b4cb2c10d47fc6d0ce 3 | timeCreated: 1478162617 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Scripts/RailEditor.cs: -------------------------------------------------------------------------------- 1 | /* RailEditor v1.0 2 | * 3 | * By Jason Hein 4 | */ 5 | 6 | 7 | using UnityEngine; 8 | using System; 9 | using System.Collections; 10 | using GameEye2D.Focus; 11 | using UnityEditor; 12 | 13 | [CustomEditor(typeof(Rail), true)] 14 | public class RailEditor : Editor { 15 | 16 | //The rail object 17 | Rail m_Rail; 18 | Transform m_HandleTransform; 19 | Quaternion m_HandleRotation; 20 | 21 | //The points along the rail 22 | const float m_HandleSize = 0.06f; 23 | const float m_PickSize = 0.1f; 24 | int m_SelectedIndex = -1; 25 | Vector2[] m_Points; 26 | 27 | //How far the points are seperated when created. 28 | public const float ADDED_POINT_SEPERATION = 10f; 29 | 30 | 31 | //When the scene draws 32 | void OnSceneGUI () 33 | { 34 | //Get the rail 35 | m_Rail = target as Rail; 36 | if (m_Rail == null) 37 | { 38 | return; 39 | } 40 | m_Points = m_Rail.points; 41 | m_HandleTransform = m_Rail.transform; 42 | m_HandleRotation = Tools.pivotRotation == PivotRotation.Local ? m_HandleTransform.rotation : Quaternion.identity; 43 | 44 | //Draw the points, and allow the editor to move these points 45 | if (m_Points.Length > 3) 46 | { 47 | Vector3 point0 = ShowPoint(0); 48 | for (int i = 1; i < m_Points.Length; i += 3) 49 | { 50 | Vector3 point1 = ShowPoint(i); 51 | Vector3 point2 = ShowPoint(i + 1); 52 | Vector3 point3 = ShowPoint(i + 2); 53 | Handles.DrawBezier(point0, point3, point1, point2, Color.cyan, null, 2f); 54 | point0 = point3; 55 | } 56 | } 57 | } 58 | 59 | //Shows the given point. 60 | Vector3 ShowPoint (int index) 61 | { 62 | //Get where the point is 63 | #if GAMEEYE2D_XZ 64 | Vector3 point = m_HandleTransform.TransformPoint(new Vector3 (m_Points[index].x, 0f, m_Points[index].y)); 65 | #else 66 | Vector3 point = m_HandleTransform.TransformPoint(new Vector3 (m_Points[index].x, m_Points[index].y, 0f)); 67 | #endif 68 | Handles.color = Color.white; 69 | float size = HandleUtility.GetHandleSize(point); 70 | 71 | //Create a button at the point 72 | if (Handles.Button(point, m_HandleRotation, size * m_HandleSize, size * m_PickSize, Handles.DotHandleCap)) 73 | { 74 | m_SelectedIndex = index; 75 | } 76 | 77 | //If the point is selected and has changed, update the point's position 78 | if (m_SelectedIndex == index) 79 | { 80 | EditorGUI.BeginChangeCheck(); 81 | point = Handles.DoPositionHandle(point, m_HandleRotation); 82 | if (EditorGUI.EndChangeCheck()) 83 | { 84 | Undo.RecordObject(m_Rail, "Move Point"); 85 | EditorUtility.SetDirty(m_Rail); 86 | 87 | Vector3 newPoint = m_HandleTransform.InverseTransformPoint(point); 88 | #if GAMEEYE2D_XZ 89 | m_Rail.points[index] = new Vector2 (newPoint.x, newPoint.z); 90 | #else 91 | m_Rail.points[index] = new Vector2 (newPoint.x, newPoint.y); 92 | #endif 93 | } 94 | } 95 | 96 | //Return the point 97 | return point; 98 | } 99 | 100 | //Add buttons to grow or shrink the rail 101 | public override void OnInspectorGUI () 102 | { 103 | DrawDefaultInspector(); 104 | m_Rail = target as Rail; 105 | if (m_Rail == null) 106 | { 107 | return; 108 | } 109 | m_Points = m_Rail.points; 110 | 111 | if (GUILayout.Button("Add Curve to Beginning")) 112 | { 113 | Undo.RecordObject(m_Rail, "Add Curve to Beginning"); 114 | AddCurveToBeginning(); 115 | EditorUtility.SetDirty(m_Rail); 116 | } 117 | else if (GUILayout.Button("Add Curve To End")) 118 | { 119 | Undo.RecordObject(m_Rail, "Add Curve To End"); 120 | AddCurveToEnd(); 121 | EditorUtility.SetDirty(m_Rail); 122 | } 123 | else if (GUILayout.Button("Remove Curve From Beginning")) 124 | { 125 | Undo.RecordObject(m_Rail, "Remove Curve From Beginning"); 126 | RemoveCurveFromBeginning(); 127 | EditorUtility.SetDirty(m_Rail); 128 | } 129 | else if (GUILayout.Button("Remove Curve From End")) 130 | { 131 | Undo.RecordObject(m_Rail, "Remove Curve From End"); 132 | RemoveCurveFromEnd(); 133 | EditorUtility.SetDirty(m_Rail); 134 | } 135 | } 136 | 137 | //Adds 3 points to the beginning of the rail. 138 | void AddCurveToBeginning() 139 | { 140 | Array.Resize(ref m_Points, m_Points.Length + 3); 141 | for (int i = 1; i < m_Points.Length - 3; i += 3) 142 | { 143 | m_Points[i + 3] = m_Points[i]; 144 | m_Points[i + 4] = m_Points[i + 1]; 145 | m_Points[i + 5] = m_Points[i + 2]; 146 | } 147 | m_Points[3] = m_Points[0]; 148 | 149 | Vector2 point = m_Points[3]; 150 | point.x -= ADDED_POINT_SEPERATION; 151 | m_Points[2] = point; 152 | point.x -= ADDED_POINT_SEPERATION; 153 | m_Points[1] = point; 154 | point.x -= ADDED_POINT_SEPERATION; 155 | m_Points[0] = point; 156 | m_Rail.points = m_Points; 157 | } 158 | 159 | //Adds 3 points to the end of the rail. 160 | void AddCurveToEnd() 161 | { 162 | Vector2 point = m_Points[m_Points.Length - 1]; 163 | Array.Resize(ref m_Points, m_Points.Length + 3); 164 | point.x += ADDED_POINT_SEPERATION; 165 | m_Points[m_Points.Length - 3] = point; 166 | point.x += ADDED_POINT_SEPERATION; 167 | m_Points[m_Points.Length - 2] = point; 168 | point.x += ADDED_POINT_SEPERATION; 169 | m_Points[m_Points.Length - 1] = point; 170 | m_Rail.points = m_Points; 171 | } 172 | 173 | //Removes 3 points on the rail from the beginning. 174 | void RemoveCurveFromBeginning() 175 | { 176 | if (m_Points.Length > 6) 177 | { 178 | m_Points[0] = m_Points[3]; 179 | for (int i = 1; i < m_Points.Length - 3; i += 3) 180 | { 181 | m_Points[i] = m_Points[i + 3]; 182 | m_Points[i + 1] = m_Points[i + 4]; 183 | m_Points[i + 2] = m_Points[i + 5]; 184 | } 185 | Array.Resize(ref m_Points, m_Points.Length - 3); 186 | m_Rail.points = m_Points; 187 | } 188 | } 189 | 190 | //Removes 3 points on the rail from the end. 191 | void RemoveCurveFromEnd() 192 | { 193 | if (m_Points.Length > 6) 194 | { 195 | Array.Resize(ref m_Points, m_Points.Length - 3); 196 | m_Rail.points = m_Points; 197 | } 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Editor/Scripts/RailEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d204f48bba4dbe42943b81d5838c5e9 3 | timeCreated: 1475826063 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 101d96cc0b108d44dbc0fc1d22d01e54 3 | folderAsset: yes 4 | timeCreated: 1478844490 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e55e181daf069bd4bb0eba8bb4719cec 3 | folderAsset: yes 4 | timeCreated: 1471588259 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/Background.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Background 10 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: 9be913bb67c000547948ba81b182ddf1, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _ColorMask: 15 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _Glossiness: 0.5 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _Shininess: 0.7 69 | - _SrcBlend: 1 70 | - _Stencil: 0 71 | - _StencilComp: 8 72 | - _StencilOp: 0 73 | - _StencilReadMask: 255 74 | - _StencilWriteMask: 255 75 | - _UVSec: 0 76 | - _UseUIAlphaClip: 0 77 | - _ZWrite: 1 78 | m_Colors: 79 | - _Color: {r: 0.15129463, g: 0.1401384, b: 0.2352941, a: 0.58431375} 80 | - _Emission: {r: 0.9044118, g: 0.6976629, b: 0.2527033, a: 0} 81 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 82 | - _Offset: {r: 0, g: 0, b: 0, a: 0} 83 | - _Scale: {r: 1, g: 1, b: 1, a: 1} 84 | - _SpecColor: {r: 0, g: 0, b: 0, a: 1} 85 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/Background.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dee1974b6e0db3648abb6ca7effa660f 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/Bars.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Bars 10 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _MainTex: 22 | m_Texture: {fileID: 2800000, guid: 9be913bb67c000547948ba81b182ddf1, type: 3} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | m_Floats: 26 | - _Shininess: 0.7 27 | m_Colors: 28 | - _Color: {r: 0.78676474, g: 0.5058913, b: 0.1504109, a: 1} 29 | - _Emission: {r: 0.13235295, g: 0.054397598, b: 0.03406142, a: 1} 30 | - _Offset: {r: 0, g: 0, b: 0, a: 0} 31 | - _Scale: {r: 1, g: 1, b: 1, a: 1} 32 | - _SpecColor: {r: 0, g: 0, b: 0, a: 0} 33 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/Bars.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4509a73655c9b484c9da60a3ad807a15 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/BounceWalls.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: BounceWalls 10 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _MainTex: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | m_Floats: [] 26 | m_Colors: 27 | - _Color: {r: 0.7205882, g: 0, b: 0, a: 1} 28 | - _Offset: {r: 0, g: 0, b: 0, a: 0} 29 | - _Scale: {r: 1, g: 1, b: 1, a: 1} 30 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/BounceWalls.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6aefc2dbad85674c90f4c552c616329 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/Player.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Player 10 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _Glossiness: 0.5 63 | - _Metallic: 0 64 | - _Mode: 0 65 | - _OcclusionStrength: 1 66 | - _Parallax: 0.02 67 | - _SrcBlend: 1 68 | - _UVSec: 0 69 | - _ZWrite: 1 70 | m_Colors: 71 | - _Color: {r: 1, g: 1, b: 1, a: 1} 72 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 73 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/Player.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60f3be2666287894896144a739919823 3 | timeCreated: 1471588295 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/StarsYellow.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: StarsYellow 10 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _Glossiness: 0.5 63 | - _Metallic: 0 64 | - _Mode: 0 65 | - _OcclusionStrength: 1 66 | - _Parallax: 0.02 67 | - _SrcBlend: 1 68 | - _UVSec: 0 69 | - _ZWrite: 1 70 | m_Colors: 71 | - _Color: {r: 0.86764705, g: 0.79865766, b: 0.5103806, a: 1} 72 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 73 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/StarsYellow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f31d773ee57e412418472b18da80b6e2 3 | timeCreated: 1474089662 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/Walls.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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Walls 10 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _Glossiness: 0.5 63 | - _Metallic: 0 64 | - _Mode: 0 65 | - _OcclusionStrength: 1 66 | - _Parallax: 0.02 67 | - _SrcBlend: 1 68 | - _UVSec: 0 69 | - _ZWrite: 1 70 | m_Colors: 71 | - _Color: {r: 0, g: 0, b: 0, a: 1} 72 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 73 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Materials/Walls.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0b09bdaac8679c49bf5883df03e8836 3 | timeCreated: 1471588326 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/PhysicsMaterials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6db3a378f124a347912f1226e42224b 3 | folderAsset: yes 4 | timeCreated: 1471588253 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/PhysicsMaterials/Ball.physicsMaterial2D: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!62 &6200000 4 | PhysicsMaterial2D: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Ball 9 | friction: 0.05 10 | bounciness: 0.9 11 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/PhysicsMaterials/Ball.physicsMaterial2D.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c76dd9b957667db4ca9051a018132c78 3 | timeCreated: 1470992001 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/PhysicsMaterials/Ball3D.physicMaterial: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!134 &13400000 4 | PhysicMaterial: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Ball3D 9 | dynamicFriction: 0.04 10 | staticFriction: 0.06 11 | bounciness: 0.9 12 | frictionCombine: 0 13 | bounceCombine: 3 14 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/PhysicsMaterials/Ball3D.physicMaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35cc45d9ddeff814ea914112462741f6 3 | timeCreated: 1479921326 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/PhysicsMaterials/Player.physicsMaterial2D: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!62 &6200000 4 | PhysicsMaterial2D: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Player 9 | friction: 0.1 10 | bounciness: 0 11 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/PhysicsMaterials/Player.physicsMaterial2D.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ef752832ee6cf84881d7499b07165aa 3 | timeCreated: 1471593163 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18d0afa69c5e5014183d8779b28d8c6d 3 | folderAsset: yes 4 | timeCreated: 1474122868 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Resources/Ball 3D.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000013226074362} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000013226074362 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4000010993990034} 22 | - component: {fileID: 33000011637581692} 23 | - component: {fileID: 23000012846810170} 24 | - component: {fileID: 135000013375766442} 25 | - component: {fileID: 54000014099619048} 26 | - component: {fileID: 114000013891092106} 27 | m_Layer: 0 28 | m_Name: Ball 3D 29 | m_TagString: Untagged 30 | m_Icon: {fileID: 0} 31 | m_NavMeshLayer: 0 32 | m_StaticEditorFlags: 0 33 | m_IsActive: 1 34 | --- !u!4 &4000010993990034 35 | Transform: 36 | m_ObjectHideFlags: 1 37 | m_PrefabParentObject: {fileID: 0} 38 | m_PrefabInternal: {fileID: 100100000} 39 | m_GameObject: {fileID: 1000013226074362} 40 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 41 | m_LocalPosition: {x: 0, y: 0, z: -1} 42 | m_LocalScale: {x: 1, y: 1, z: 1} 43 | m_Children: [] 44 | m_Father: {fileID: 0} 45 | m_RootOrder: 0 46 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 47 | --- !u!23 &23000012846810170 48 | MeshRenderer: 49 | m_ObjectHideFlags: 1 50 | m_PrefabParentObject: {fileID: 0} 51 | m_PrefabInternal: {fileID: 100100000} 52 | m_GameObject: {fileID: 1000013226074362} 53 | m_Enabled: 1 54 | m_CastShadows: 1 55 | m_ReceiveShadows: 1 56 | m_MotionVectors: 1 57 | m_LightProbeUsage: 0 58 | m_ReflectionProbeUsage: 1 59 | m_Materials: 60 | - {fileID: 2100000, guid: 4509a73655c9b484c9da60a3ad807a15, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 0} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_PreserveUVs: 0 69 | m_IgnoreNormalsForChartDetection: 0 70 | m_ImportantGI: 0 71 | m_SelectedEditorRenderState: 3 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | --- !u!33 &33000011637581692 80 | MeshFilter: 81 | m_ObjectHideFlags: 1 82 | m_PrefabParentObject: {fileID: 0} 83 | m_PrefabInternal: {fileID: 100100000} 84 | m_GameObject: {fileID: 1000013226074362} 85 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 86 | --- !u!54 &54000014099619048 87 | Rigidbody: 88 | m_ObjectHideFlags: 1 89 | m_PrefabParentObject: {fileID: 0} 90 | m_PrefabInternal: {fileID: 100100000} 91 | m_GameObject: {fileID: 1000013226074362} 92 | serializedVersion: 2 93 | m_Mass: 1 94 | m_Drag: 0 95 | m_AngularDrag: 0.05 96 | m_UseGravity: 0 97 | m_IsKinematic: 0 98 | m_Interpolate: 1 99 | m_Constraints: 0 100 | m_CollisionDetection: 2 101 | --- !u!114 &114000013891092106 102 | MonoBehaviour: 103 | m_ObjectHideFlags: 1 104 | m_PrefabParentObject: {fileID: 0} 105 | m_PrefabInternal: {fileID: 100100000} 106 | m_GameObject: {fileID: 1000013226074362} 107 | m_Enabled: 1 108 | m_EditorHideFlags: 0 109 | m_Script: {fileID: 11500000, guid: 91871efdc2b8a9240a8b82f5b12a91b1, type: 3} 110 | m_Name: 111 | m_EditorClassIdentifier: 112 | m_Influence: {x: 1, y: 1} 113 | m_DrawDebug: 0 114 | m_Offset: {x: 0, y: 0} 115 | m_VelocityToOffset: {x: 0.6, y: 0.6} 116 | Speed: 40 117 | --- !u!135 &135000013375766442 118 | SphereCollider: 119 | m_ObjectHideFlags: 1 120 | m_PrefabParentObject: {fileID: 0} 121 | m_PrefabInternal: {fileID: 100100000} 122 | m_GameObject: {fileID: 1000013226074362} 123 | m_Material: {fileID: 13400000, guid: 35cc45d9ddeff814ea914112462741f6, type: 2} 124 | m_IsTrigger: 0 125 | m_Enabled: 1 126 | serializedVersion: 2 127 | m_Radius: 0.5 128 | m_Center: {x: 0, y: 0, z: 0} 129 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Resources/Ball 3D.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05cee68138dc14b45ace128e8f499499 3 | timeCreated: 1479914269 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Resources/Ball.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &151794 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 5 9 | m_Component: 10 | - component: {fileID: 451794} 11 | - component: {fileID: 3351794} 12 | - component: {fileID: 2351794} 13 | - component: {fileID: 5094980} 14 | - component: {fileID: 5884084} 15 | - component: {fileID: 11430098} 16 | m_Layer: 0 17 | m_Name: Ball 18 | m_TagString: Untagged 19 | m_Icon: {fileID: 0} 20 | m_NavMeshLayer: 0 21 | m_StaticEditorFlags: 0 22 | m_IsActive: 1 23 | --- !u!4 &451794 24 | Transform: 25 | m_ObjectHideFlags: 1 26 | m_PrefabParentObject: {fileID: 0} 27 | m_PrefabInternal: {fileID: 100100000} 28 | m_GameObject: {fileID: 151794} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: -1} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!23 &2351794 37 | MeshRenderer: 38 | m_ObjectHideFlags: 1 39 | m_PrefabParentObject: {fileID: 0} 40 | m_PrefabInternal: {fileID: 100100000} 41 | m_GameObject: {fileID: 151794} 42 | m_Enabled: 1 43 | m_CastShadows: 1 44 | m_ReceiveShadows: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 0 47 | m_ReflectionProbeUsage: 1 48 | m_Materials: 49 | - {fileID: 2100000, guid: 4509a73655c9b484c9da60a3ad807a15, type: 2} 50 | m_StaticBatchInfo: 51 | firstSubMesh: 0 52 | subMeshCount: 0 53 | m_StaticBatchRoot: {fileID: 0} 54 | m_ProbeAnchor: {fileID: 0} 55 | m_LightProbeVolumeOverride: {fileID: 0} 56 | m_ScaleInLightmap: 1 57 | m_PreserveUVs: 0 58 | m_IgnoreNormalsForChartDetection: 0 59 | m_ImportantGI: 0 60 | m_SelectedEditorRenderState: 3 61 | m_MinimumChartSize: 4 62 | m_AutoUVMaxDistance: 0.5 63 | m_AutoUVMaxAngle: 89 64 | m_LightmapParameters: {fileID: 0} 65 | m_SortingLayerID: 0 66 | m_SortingLayer: 0 67 | m_SortingOrder: 0 68 | --- !u!33 &3351794 69 | MeshFilter: 70 | m_ObjectHideFlags: 1 71 | m_PrefabParentObject: {fileID: 0} 72 | m_PrefabInternal: {fileID: 100100000} 73 | m_GameObject: {fileID: 151794} 74 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 75 | --- !u!50 &5094980 76 | Rigidbody2D: 77 | serializedVersion: 4 78 | m_ObjectHideFlags: 1 79 | m_PrefabParentObject: {fileID: 0} 80 | m_PrefabInternal: {fileID: 100100000} 81 | m_GameObject: {fileID: 151794} 82 | m_BodyType: 0 83 | m_Simulated: 1 84 | m_UseFullKinematicContacts: 0 85 | m_UseAutoMass: 0 86 | m_Mass: 1 87 | m_LinearDrag: 0 88 | m_AngularDrag: 0.05 89 | m_GravityScale: 0 90 | m_Material: {fileID: 0} 91 | m_Interpolate: 1 92 | m_SleepingMode: 1 93 | m_CollisionDetection: 1 94 | m_Constraints: 0 95 | --- !u!58 &5884084 96 | CircleCollider2D: 97 | m_ObjectHideFlags: 1 98 | m_PrefabParentObject: {fileID: 0} 99 | m_PrefabInternal: {fileID: 100100000} 100 | m_GameObject: {fileID: 151794} 101 | m_Enabled: 1 102 | m_Density: 1 103 | m_Material: {fileID: 6200000, guid: c76dd9b957667db4ca9051a018132c78, type: 2} 104 | m_IsTrigger: 0 105 | m_UsedByEffector: 0 106 | m_UsedByComposite: 0 107 | m_Offset: {x: 0, y: 0} 108 | serializedVersion: 2 109 | m_Radius: 0.6 110 | --- !u!114 &11430098 111 | MonoBehaviour: 112 | m_ObjectHideFlags: 1 113 | m_PrefabParentObject: {fileID: 0} 114 | m_PrefabInternal: {fileID: 100100000} 115 | m_GameObject: {fileID: 151794} 116 | m_Enabled: 1 117 | m_EditorHideFlags: 0 118 | m_Script: {fileID: 11500000, guid: ea51037d416d9c84e98ee1d716c71df9, type: 3} 119 | m_Name: 120 | m_EditorClassIdentifier: 121 | m_Influence: {x: 1, y: 1} 122 | m_DrawDebug: 1 123 | m_Offset: {x: 0, y: 0} 124 | m_VelocityToOffset: {x: 0.6, y: 0.6} 125 | Speed: 20 126 | --- !u!1001 &100100000 127 | Prefab: 128 | m_ObjectHideFlags: 1 129 | serializedVersion: 2 130 | m_Modification: 131 | m_TransformParent: {fileID: 0} 132 | m_Modifications: [] 133 | m_RemovedComponents: [] 134 | m_ParentPrefab: {fileID: 0} 135 | m_RootGameObject: {fileID: 151794} 136 | m_IsPrefabParent: 1 137 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Resources/Ball.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35540613ff6aac94da5f818289657476 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 578295106c44f1d46b88c39c641e848b 3 | folderAsset: yes 4 | timeCreated: 1479555221 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Behaviors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3a6c09a273af884bb9b61ff29ba6ef6 3 | folderAsset: yes 4 | timeCreated: 1479555202 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Behaviors/Fixed Follow.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa0fe7243910cbf4c8135b1dfec1dcfe 3 | timeCreated: 1479553822 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Behaviors/Scroll Zoom.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc634c2e2a8bae7469197c30037d5bba 3 | timeCreated: 1479912337 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Behaviors/Shake.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 064eedbd9db386746bf9f75b4170dca4 3 | timeCreated: 1479914034 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Behaviors/Smooth Follow.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 897362c74e0b74f47b3c36e4e8473264 3 | timeCreated: 1471588218 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Behaviors/Smooth Scroll Zoom.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1720a0a770a7e1d4aa92234eb1a1484e 3 | timeCreated: 1479930592 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Behaviors/Zoom To Fit - Press Mouse 1.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55b1bf52b76ad7346ad0197d6861395a 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6abeb83dfe852634b825b3a40e8ea8ad 3 | folderAsset: yes 4 | timeCreated: 1479555234 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Follow Rail X.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b379f39f882b4a46b3c7617476768d9 3 | timeCreated: 1479459203 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Follow Rail Y.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e064c9bb893087a43838af2b09c78b50 3 | timeCreated: 1479460428 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Follow Rail.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54c4ccc21bd564e4aa4a36e2e3f482f4 3 | timeCreated: 1478943534 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Mouse Cursor.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7459eb8bd563f49439ed9ba494847264 3 | timeCreated: 1479913110 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Rigid Body 2D.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c83c269876fe214788449a74090857b 3 | timeCreated: 1479464323 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Rigid Body.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01bd842ec94d1844ea47529ba7a9088c 3 | timeCreated: 1479914123 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Simple Moving.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36f7341fa0425a84ea0dc69cb8c3d275 3 | timeCreated: 1479465372 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Timed Rail.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0233b2bbb05464c4fbe2c07dec2ce13c 3 | timeCreated: 1479463963 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Timed Trigger.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 095fe0d46518deb41a2b678527832795 3 | timeCreated: 1479555169 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Transform.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d907defbfe0e53f45809922f1da73a85 3 | timeCreated: 1479553881 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/Trigger.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fedbdfa94968674e9f85c24f5bb759c 3 | timeCreated: 1479553958 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/World Cursor Limited.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e1a27d6cee286a4c82bbc610e8166bc 3 | timeCreated: 1479922164 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Focus/World Cursor.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fdd34a549976f04dbb1f652588ff81f 3 | timeCreated: 1479922555 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Tools.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17fa7e3bce45c2a4c965b00f82df878a 3 | folderAsset: yes 4 | timeCreated: 1479555259 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Tools/Clamp To Screen.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 602d7401b411e4f4d8aba7205cb35606 3 | timeCreated: 1479552570 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Tools/Parralax.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aab7eca5c18086845b1d7c67605e1079 3 | timeCreated: 1479929224 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Tools/Trigger Camera Limits.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e87432f97333e549acc4298340e0cfb 3 | timeCreated: 1484739190 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Tools/Trigger Cameras.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a3b8aaf2e42f0b4d96bd33f8cfa72ff 3 | timeCreated: 1479924483 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Tools/Trigger Focus List.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3345f55f9c2b02443b4f608eddfef318 3 | timeCreated: 1479927633 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scenes/Tools/Trigger Zoom.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 604b18522667304468abd18bc6f74193 3 | timeCreated: 1479923822 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5025dcc9309a8724b974515b5f516836 3 | folderAsset: yes 4 | timeCreated: 1471588242 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/Ball3DMove.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using GameEye2D.Focus; 4 | using GameEye2D.Behaviour; 5 | 6 | [RequireComponent(typeof(Rigidbody))] 7 | public class Ball3DMove : F_RigidBody 8 | { 9 | //Camea2d that uses the ball as a focus, and the camera shake for when a collison occurs 10 | Camera2D m_Camera2D; 11 | Shake m_CameraShake; 12 | 13 | //Starting speed and gravity of this ball 14 | public float Speed = 20f; 15 | const float GRAVITY = -500f; 16 | 17 | 18 | //When the ball becomes enabled 19 | void OnEnable() 20 | { 21 | //Set initial speed 22 | body.AddForce(Random.insideUnitSphere.normalized * Speed / Time.fixedDeltaTime); 23 | 24 | //Tell the camera to follow this ball 25 | m_Camera2D = Camera.main.GetComponent(); 26 | m_CameraShake = Camera.main.GetComponent(); 27 | if (m_Camera2D != null) 28 | { 29 | m_Camera2D.AddFocus(this); 30 | } 31 | } 32 | 33 | //When the ball becomes disabled the camera should stop following it 34 | void OnDisable() 35 | { 36 | if (m_Camera2D != null) 37 | { 38 | m_Camera2D.RemoveFocus(this); 39 | } 40 | } 41 | 42 | //Cause gravity 43 | void FixedUpdate() 44 | { 45 | body.AddForce(Vector3.up * GRAVITY * Time.fixedDeltaTime); 46 | } 47 | 48 | //When the ball collides the camera may shake 49 | void OnCollisionEnter(Collision collision) 50 | { 51 | if (m_CameraShake != null) 52 | { 53 | m_CameraShake.ShakeCamera(collision.relativeVelocity); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/Ball3DMove.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91871efdc2b8a9240a8b82f5b12a91b1 3 | timeCreated: 1479921069 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/BallMove.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using GameEye2D.Focus; 4 | using GameEye2D.Behaviour; 5 | 6 | [RequireComponent(typeof(Rigidbody2D))] 7 | public class BallMove : F_RigidBody2D 8 | { 9 | //Camea2d that uses the ball as a focus, and the camera shake for when a collison occurs 10 | Camera2D m_Camera2D; 11 | Shake m_CameraShake; 12 | 13 | //Starting speed and gravity of this ball 14 | public float Speed = 20f; 15 | const float GRAVITY = -500f; 16 | 17 | 18 | //When the ball becomes enabled 19 | void OnEnable() 20 | { 21 | //Set initial speed 22 | body2D.AddForce(Random.insideUnitCircle.normalized * Speed / Time.fixedDeltaTime); 23 | 24 | //Tell the camera to follow this ball 25 | m_Camera2D = Camera.main.GetComponent(); 26 | m_CameraShake = Camera.main.GetComponent(); 27 | if (m_Camera2D != null) 28 | { 29 | m_Camera2D.AddFocus(this); 30 | } 31 | } 32 | 33 | //When the ball becomes disabled the camera should stop following it 34 | void OnDisable() 35 | { 36 | if (m_Camera2D != null) 37 | { 38 | m_Camera2D.RemoveFocus(this); 39 | } 40 | } 41 | 42 | //Cause gravity 43 | void FixedUpdate() 44 | { 45 | body2D.AddForce(Vector2.up * GRAVITY * Time.fixedDeltaTime); 46 | } 47 | 48 | //When the ball collides the camera may shake 49 | void OnCollisionEnter2D(Collision2D collision) 50 | { 51 | if (m_CameraShake != null) 52 | { 53 | m_CameraShake.ShakeCamera(collision.relativeVelocity); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/BallMove.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea51037d416d9c84e98ee1d716c71df9 3 | timeCreated: 1471005329 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/BallSpawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public class BallSpawner : MonoBehaviour 5 | { 6 | //Objects spawned 7 | [SerializeField] GameObject m_ObjectToSpawn; 8 | List m_ObjectsSpawned; 9 | 10 | //Firing speed 11 | const float FIRE_RATE = 0.3f; 12 | float m_FireTimer = -1.0f; 13 | 14 | 15 | //Load objects to spawn 16 | void Start () 17 | { 18 | m_ObjectsSpawned = new List(); 19 | if (m_ObjectToSpawn == null) 20 | { 21 | enabled = false; 22 | } 23 | else 24 | { 25 | SpawnBall(); 26 | } 27 | } 28 | 29 | //Check for input to spawn a ball 30 | void Update () 31 | { 32 | //If the user hits the escape button, end the application 33 | if (Input.GetKey(KeyCode.Escape)) 34 | { 35 | Application.Quit(); 36 | } 37 | 38 | //Check fire rate 39 | m_FireTimer -= Time.deltaTime; 40 | if (m_FireTimer > 0.0f) 41 | { 42 | return; 43 | } 44 | 45 | //Whenever the left mouse button is clicked spawn a ball and reset the firing timer 46 | if (Input.GetMouseButton(0)) 47 | { 48 | SpawnBall(); 49 | } 50 | 51 | //Whenever you click the Right mouse button remove the first ball in the array 52 | if (Input.GetMouseButton(1) && m_ObjectsSpawned.Count > 0) 53 | { 54 | DeSpawnBall(); 55 | } 56 | } 57 | 58 | void SpawnBall () 59 | { 60 | if (m_ObjectToSpawn != null) 61 | { 62 | m_FireTimer = FIRE_RATE; 63 | GameObject ball = ((GameObject)GameObject.Instantiate(m_ObjectToSpawn, transform.position, Quaternion.identity)); 64 | ball.transform.parent = transform; 65 | 66 | if (ball == null) 67 | { 68 | Debug.Log("w"); 69 | } 70 | m_ObjectsSpawned.Add(ball); 71 | } 72 | } 73 | 74 | void DeSpawnBall () 75 | { 76 | m_FireTimer = FIRE_RATE; 77 | m_ObjectsSpawned[0].SetActive(false); 78 | Destroy(m_ObjectsSpawned[0]); 79 | m_ObjectsSpawned.RemoveAt(0); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/BallSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb5efd1c9fe5eaf43bd36d3140d8ea8b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/KillZone.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class KillZone : MonoBehaviour { 5 | 6 | //The object affected by the killzone, and the respawn point 7 | [SerializeField] GameObject m_Player; 8 | [SerializeField] GameObject m_RespawnPoint; 9 | 10 | //A timer for when to respawn the player 11 | float m_TimeOfRespawn = 0f; 12 | const float RESPAWN_DELAY = 1f; 13 | 14 | 15 | //Check if the player and respanw points exist 16 | void Awake () 17 | { 18 | if (m_Player == null || m_RespawnPoint == null) 19 | { 20 | enabled = false; 21 | Destroy(this); 22 | } 23 | 24 | //Don't enable the kilzone's timer to enable the player until the killzone triggers 25 | enabled = false; 26 | } 27 | 28 | //While the player is respawning, check if the player should respawn this frame 29 | void Update () 30 | { 31 | if (Time.time > m_TimeOfRespawn) 32 | { 33 | m_TimeOfRespawn = 0f; 34 | m_Player.SetActive(true); 35 | enabled = false; 36 | } 37 | } 38 | 39 | //When the player enters the trigger, they are slain and are moved to the respawn point 40 | void OnTriggerEnter2D (Collider2D collider) 41 | { 42 | if (collider.gameObject == m_Player) 43 | { 44 | Trigger(); 45 | } 46 | } 47 | 48 | //Reset the game 49 | protected virtual void Trigger () 50 | { 51 | if (m_RespawnPoint != null) 52 | { 53 | //Set the time the player will be respawned 54 | m_TimeOfRespawn = Time.time + RESPAWN_DELAY; 55 | 56 | //Put the player at the spawn point and de-activate them until the respawn delay is over 57 | m_Player.transform.position = m_RespawnPoint.transform.position; 58 | m_Player.SetActive(false); 59 | 60 | //Enable the timer to respawn 61 | enabled = true; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/KillZone.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae65d1329121545469ba3aeead23fc7e 3 | timeCreated: 1471589518 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/KillZoneResetRail.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using GameEye2D.Focus; 4 | 5 | public class KillZoneResetRail : KillZone { 6 | 7 | //The timed rail that will be reset 8 | [SerializeField] TimedRail m_Rail; 9 | 10 | //Reset the game 11 | protected override void Trigger () 12 | { 13 | //Reset the timed rail back to the start 14 | if (m_Rail != null) 15 | { 16 | m_Rail.interpolation = 0f; 17 | } 18 | 19 | //Have the player character reset 20 | base.Trigger(); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/KillZoneResetRail.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0959bcc888a7bb84abf70dd6b771369d 3 | timeCreated: 1479463674 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/KillZoneResetTrigger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using GameEye2D.Focus; 4 | 5 | public class KillZoneResetTrigger : KillZone { 6 | 7 | //The trigger that will be reset 8 | [SerializeField] Trigger m_Trigger; 9 | 10 | //Reset the game 11 | protected override void Trigger () 12 | { 13 | //Remove the trigger focus from the camera focus list 14 | if (m_Trigger != null) 15 | { 16 | m_Trigger.Undo(); 17 | } 18 | 19 | //Have the player character reset 20 | base.Trigger(); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/KillZoneResetTrigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 602c84578b900fb498a2592a8b5b1adf 3 | timeCreated: 1479554363 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/PlayerMovement.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using GameEye2D.Focus; 4 | 5 | [RequireComponent(typeof(Rigidbody2D))] 6 | public class PlayerMovement : MonoBehaviour 7 | { 8 | //Horizontal movement 9 | const float HORIZONTAL_SPEED = 300f; 10 | const float TIME_TO_REACH_FULL_HORIZONTAL_SPEED = 0.075f; 11 | const float TIME_TO_END_HORIZONTAL_SPEED = 0.075f; 12 | 13 | //Vertical movement 14 | const float JUMP_SPEED = 900f; 15 | const float MINIMUM_INPUT_TO_JUMP = 0.5f; 16 | const float INPUT_AFFECT_ON_GRAVITY = 0.4f; 17 | const float GRAVITY = -3000f; 18 | 19 | //Checking if the player can jump 20 | bool m_Grounded = false; 21 | const float GROUNDED_NORMAL = 0.0f; 22 | 23 | //Input 24 | const string VERTICAL = "Vertical"; 25 | const string HORIZONTAL = "Horizontal"; 26 | float m_VerticalInput = 0f; 27 | float m_HorizontalInput = 0f; 28 | 29 | //The player's rigidbody2D 30 | Rigidbody2D m_RigidBody2D; 31 | 32 | 33 | //Get the rigidBody of the player. 34 | void Start () 35 | { 36 | m_RigidBody2D = GetComponent(); 37 | } 38 | 39 | //Get input in update, to make input more consistent 40 | void Update () 41 | { 42 | //Vertical input 43 | if (Input.GetKey(KeyCode.Space)) 44 | { 45 | m_VerticalInput = Time.deltaTime; 46 | } 47 | else 48 | { 49 | m_VerticalInput = Input.GetAxisRaw(VERTICAL); 50 | } 51 | 52 | ///Horizontal input 53 | m_HorizontalInput = Input.GetAxisRaw(HORIZONTAL); 54 | } 55 | 56 | //A set number of times per second (by default occurs 50 times a second) 57 | void FixedUpdate () 58 | { 59 | //Get the players current speed and initialize acceleration this frame to 0 60 | Vector2 velocity = m_RigidBody2D.velocity; 61 | Vector2 acceleration = Vector2.zero; 62 | 63 | //Get the players horizontal acceleration this frame 64 | acceleration.x += HORIZONTAL_SPEED / TIME_TO_REACH_FULL_HORIZONTAL_SPEED * m_HorizontalInput; 65 | 66 | //Decelleration due to no input and to clamp the maximum speed gradually 67 | acceleration.x -= (velocity.x / TIME_TO_REACH_FULL_HORIZONTAL_SPEED) / TIME_TO_END_HORIZONTAL_SPEED; 68 | 69 | //Jumping 70 | if (m_Grounded && m_VerticalInput > MINIMUM_INPUT_TO_JUMP) 71 | { 72 | acceleration.y = JUMP_SPEED / Time.fixedDeltaTime; 73 | m_Grounded = false; 74 | } 75 | //Falling 76 | else 77 | { 78 | //Add gravity to make the player fall, and affect gravity with the players input 79 | acceleration.y += GRAVITY * (1f - INPUT_AFFECT_ON_GRAVITY * m_VerticalInput); 80 | 81 | //Decleleration due to no input, and to clmap the maximumn speed gradually 82 | acceleration.y -= velocity.y; 83 | } 84 | 85 | //Add the given force to the player 86 | m_RigidBody2D.AddForce(acceleration * Time.fixedDeltaTime); 87 | } 88 | 89 | //Check if the player has become grounded 90 | void OnCollisionEnter2D (Collision2D collision) 91 | { 92 | //Get the average normal of the collision 93 | Vector2 averageNormal = Vector2.zero; 94 | for (int i = 0; i < collision.contacts.Length; i++) 95 | { 96 | averageNormal += collision.contacts[i].normal; 97 | } 98 | averageNormal /= collision.contacts.Length; 99 | 100 | //If the collision the player entered was with the ground, we are now grounded 101 | if (averageNormal.y > GROUNDED_NORMAL) 102 | { 103 | m_Grounded = true; 104 | } 105 | } 106 | 107 | //Check if the player has left the ground 108 | void OnCollisionExit2D (Collision2D collision) 109 | { 110 | //Get the average normal of the collision 111 | Vector2 averageNormal = Vector2.zero; 112 | for (int i = 0; i < collision.contacts.Length; i++) 113 | { 114 | averageNormal += collision.contacts[i].normal; 115 | } 116 | averageNormal /= collision.contacts.Length; 117 | 118 | //If the collision the player exited was with the ground, we are no longer grounded 119 | if (averageNormal.y > GROUNDED_NORMAL) 120 | { 121 | m_Grounded = false; 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Examples/Scripts/PlayerMovement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c236309663e771a4398d184c3a5935f5 3 | timeCreated: 1471589445 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Game Eye 2D Documentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonHein/Game-Eye-2D/38e30e9542d61b8101dccce9ca11631bfaab07a8/GameEye2D/Assets/GameEye2D/Game Eye 2D Documentation.pdf -------------------------------------------------------------------------------- /GameEye2D/Assets/GameEye2D/Game Eye 2D Documentation.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ab6ed8bdacc31e46b9f388ced5435c1 3 | timeCreated: 1482058428 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Jason Hein 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Game-Eye-2D 2 | A component based orthographic camera extension for unity that tracks 2D environments. Included are scripts that help you track 2D environments. When setup, the camera will follow objects in your scene, or zoom to fit them all, or use input from the player to track the scene, etc... 3 | 4 | Tutorial https://www.youtube.com/watch?v=p8C13371-kQ&list=PLTjnluiSpC8Sjt0VD62pDW6bkUJ1NTSDM 5 | 6 | If you want to see them in action. I'm using them in my game Spectrum Break. https://spectrumbreak.com/ 7 | 8 | 9 | Supported Games 10 | ---------------- 11 | 12 | Arenas, Platformers, RPGs, Runners, Shoot'em ups, Strategy, Custom. 13 | 14 | 15 | Features 16 | --------- 17 | 18 | You choose what is important to focus on and how the camera behaves. 19 | 20 | Quick to set up, and includes a menu of pre-built camera setups. 21 | 22 | Optimally tracks scenes smoothly and efficiently, and avoids overhead through a component based approach. 23 | 24 | Easily extendable, a short how-to guide is included in the documentation. 25 | 26 | A top down mode that causes all components to compile for a top down view. 27 | 28 | 29 | Behaviors 30 | ---------- 31 | 32 | Focus following, Camera shake, Zoom to fit multiple focuses, Input to zoom. 33 | 34 | 35 | Focuses 36 | -------- 37 | 38 | Positions, Forward focuses, Mouse cursor, Rails, Triggers. 39 | 40 | 41 | Tools 42 | ------ 43 | 44 | Parralax, Clamp objects to a camera view, Triggers to change camera values. 45 | 46 | 47 | Follow me on Bluesky 48 | ---------------------- 49 | 50 | [https://twitter.com/JasonDavidHein](https://bsky.app/profile/jasonhein.bsky.social) 51 | --------------------------------------------------------------------------------