Last active
May 31, 2020 17:51
-
-
Save MysticFragilist/a31ae59f68125185689bbb193eaae5a6 to your computer and use it in GitHub Desktop.
A sample of a Game Manager script to embed in Medium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using Cinemachine; | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
[RequireComponent(typeof(CinemachineFreeLook))] | |
public class FreeLookAddOn : MonoBehaviour | |
{ | |
[Range(0f, 10f)] public float LookSpeed = 1f; | |
public bool InvertY = false; | |
private CinemachineFreeLook _freeLookComponent; | |
public void Start() | |
{ | |
_freeLookComponent = GetComponent<CinemachineFreeLook>(); | |
} | |
// Update the look movement each time the event is trigger | |
public void OnLook(InputAction.CallbackContext context) | |
{ | |
//TODO: Add the logic for Looking with the camera | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment