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
import subprocess | |
import os | |
import pkg_resources | |
def main(): | |
try: | |
stdout = subprocess.check_output(['pyenv', 'versions']) | |
except subprocess.CalledProcessError as _: | |
print('pyenv is required.') |
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 UnityEngine.SceneManagement; | |
// ... | |
void Update () { | |
if (Input.anyKeyDown){ | |
SceneManager.LoadScene(sceneName, LoadSceneMode.Single); | |
} | |
} |
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
void Update() | |
{ | |
if(stop) return; | |
float dist = (transform.position - Player.transform.position).sqrMagnitude; | |
if (dist > 20) | |
{ | |
// get closer to player | |
Vector3 direction = transform.position - Player.transform.position; | |
Vector3 bodyOffset = new Vector3(Player.GetComponentInChildren<SkinnedMeshRenderer>().bounds.extents.x, 0, Player.GetComponentInChildren<SkinnedMeshRenderer>().bounds.extents.z); |