28 lines
616 B
C#
28 lines
616 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class gameFlowController : MonoBehaviour
|
||
|
{
|
||
|
public GameObject Agent;
|
||
|
AgentWithGun agentWithGun;
|
||
|
// Start is called before the first frame update
|
||
|
void Start()
|
||
|
{
|
||
|
agentWithGun = Agent.GetComponent<AgentWithGun>();
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
if (Input.GetKey(KeyCode.Escape))
|
||
|
{
|
||
|
Application.Quit();
|
||
|
}
|
||
|
if (Input.GetKey(KeyCode.L))
|
||
|
{
|
||
|
agentWithGun.lockMouse = !agentWithGun.lockMouse;
|
||
|
}
|
||
|
}
|
||
|
}
|