Import
temp
This commit is contained in:
parent
a87f0ed109
commit
a17810ffeb
114 changed files with 5184 additions and 5 deletions
38
Assets/otherTeam/OtherScripts/CameraMovementFlat.cs
Executable file
38
Assets/otherTeam/OtherScripts/CameraMovementFlat.cs
Executable file
|
@ -0,0 +1,38 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class CameraMovementFlat : MonoBehaviour
|
||||
{
|
||||
[SerializeField] float cameraMovementSpeed;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
//avancer reculer
|
||||
if (Input.GetKey(KeyCode.UpArrow))
|
||||
{
|
||||
//Debug.Log("avancer");
|
||||
transform.Translate(Vector3.forward * Time.deltaTime * cameraMovementSpeed, Space.World);
|
||||
}
|
||||
if (Input.GetKey(KeyCode.DownArrow))
|
||||
{
|
||||
//Debug.Log("reculer");
|
||||
transform.Translate(-Vector3.forward * Time.deltaTime * cameraMovementSpeed, Space.World);
|
||||
}
|
||||
if (Input.GetKey(KeyCode.LeftArrow))
|
||||
{
|
||||
//Debug.Log("gauche");
|
||||
transform.Translate(-Vector3.right * Time.deltaTime * cameraMovementSpeed, Space.World);
|
||||
}
|
||||
if (Input.GetKey(KeyCode.RightArrow))
|
||||
{
|
||||
//Debug.Log("droite");
|
||||
transform.Translate(Vector3.right * Time.deltaTime * cameraMovementSpeed, Space.World);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue