Skip to content

Commit

Permalink
Added an script so that the user can press ESC to quit.
Browse files Browse the repository at this point in the history
  • Loading branch information
BLayman committed Mar 13, 2019
1 parent d19b18e commit cff9b89
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 8 deletions.
Binary file added Additional_Resources/EcoSimPresentation.pptx
Binary file not shown.
Binary file added Additional_Resources/Project Proposal.pdf
Binary file not shown.
13 changes: 13 additions & 0 deletions Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -7326,6 +7326,7 @@ GameObject:
- component: {fileID: 1962162294}
- component: {fileID: 1962162293}
- component: {fileID: 1962162295}
- component: {fileID: 1962162296}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
Expand Down Expand Up @@ -7372,6 +7373,18 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
tilePrefab: {fileID: 1800501107130742, guid: 6f51ac76b4ca5014fa288d1b23b52bd7, type: 3}
--- !u!114 &1962162296
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1962162292}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a16fa5c20c92b1d41942a1a4adb88bc4, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2002400512
GameObject:
m_ObjectHideFlags: 0
Expand Down
16 changes: 16 additions & 0 deletions Assets/Scripts/EscToExit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EscToExit : MonoBehaviour
{

// Update is called once per frame
void Update()
{
if (Input.GetKey("escape"))
{
Application.Quit();
}
}
}
11 changes: 11 additions & 0 deletions Assets/Scripts/EscToExit.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ GraphicsSettings:
m_AlwaysIncludedShaders:
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
Expand Down
16 changes: 8 additions & 8 deletions ProjectSettings/UnityConnectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
--- !u!310 &1
UnityConnectSettings:
m_ObjectHideFlags: 0
m_Enabled: 0
serializedVersion: 1
m_Enabled: 1
m_TestMode: 0
m_TestEventUrl:
m_TestConfigUrl:
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
m_ConfigUrl: https://config.uca.cloud.unity3d.com
m_TestInitMode: 0
CrashReportingSettings:
m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate
m_EventUrl: https://perf-events.cloud.unity3d.com
m_Enabled: 0
m_LogBufferSize: 10
m_CaptureEditorExceptions: 1
UnityPurchasingSettings:
m_Enabled: 0
m_TestMode: 0
UnityAnalyticsSettings:
m_Enabled: 1
m_InitializeOnStartup: 1
m_TestMode: 0
m_TestEventUrl:
m_TestConfigUrl:
m_InitializeOnStartup: 1
UnityAdsSettings:
m_Enabled: 0
m_InitializeOnStartup: 1
Expand Down

0 comments on commit cff9b89

Please sign in to comment.