they do not call me the ui designer
This commit is contained in:
parent
daf3218043
commit
68af10bc4d
14 changed files with 1677 additions and 125 deletions
17
Assets/Scripts/CameraController.cs
Normal file
17
Assets/Scripts/CameraController.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class CameraController : MonoBehaviour
|
||||
{
|
||||
public float panSpeed;
|
||||
public bool canMoveCamera = true;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (canMoveCamera)
|
||||
{
|
||||
Vector2 moveDirection = new Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
|
||||
transform.Translate(moveDirection * (panSpeed * Time.deltaTime));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue