Skip to content

Instantly share code, notes, and snippets.

@andybak
Created October 5, 2019 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andybak/e8a05cce9a76090a14ba06fd8f53a274 to your computer and use it in GitHub Desktop.
Save andybak/e8a05cce9a76090a14ba06fd8f53a274 to your computer and use it in GitHub Desktop.
using UnityEngine;
public static class C
{
public static Camera Cam
{
get { return Camera.main;}
}
public static Vector3 CamPos
{
get { return Cam.transform.position;}
set { CamPos = value;}
}
public static void MoveCam(float x, float y, float z)
{
CamPos = CamPos + new Vector3(x, y, z);
}
public static float TimeScale
{
get { return Time.timeScale; }
set { Time.timeScale = value; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment