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
// AKA'd as Lerp | |
// Returns the point between A and B if t is time or progress and is clamped between 0 and 1 | |
function LinearBezier(A, B, t) : float { | |
return (1-t) * A + | |
(t) * B; | |
} | |
// Querp? | |
function QuadraticBezier(A, B, C, t) : float { | |
return (1-t) * LinearBezier(A, B, t) + |
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
# -*- coding: utf-8 -*- | |
import sys | |
import subprocess | |
# 'environment variables' for the script. | |
# I guess you can import os.environ, but w/e | |
env = {"FUEL_ENV": "sandbox"} | |
def Execute(cmd): | |
print cmd |
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
class MyClass { | |
str = "test string"; // not an error in babel + core-js | |
static x = 0; // not an error in babel + core-js | |
constructor() { | |
this.str = "test string"; | |
this.x = 0; | |
console.log(this.str); | |
console.log(this.x); | |
} |
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
class MyClass: | |
str = "test string" # not an error | |
x = 0 # not an error | |
def __init__(self): | |
print self.str | |
print self.x | |
# outside of class scope |
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
Vector3 currentCameraPosition = cam.transform.position - (this.transform.position + lookOffset); | |
Vector3 currentCameraPositionXZ = new Vector3(relativeCameraPosition.x, 0, relativeCameraPosition.z); | |
float currentCameraPitch = Mathf.Atan2(currentCameraPosition.y, currentCameraPositionXZ.magnitude) * Mathf.Rad2Deg; | |
if (currentCameraPitch > maxCameraPitch) | |
{ | |
// This camera is too damn high! | |
} |
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
bool handlingInput = false; | |
void Update () | |
{ | |
if(!handlingInput) | |
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began) | |
{ | |
handlingInput = true; | |
StartCoroutine(HandleTouch()); | |
} |
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
class AaronBehaviour : MonoBehaviour | |
{ | |
protected AudioController audio | |
{ | |
get | |
{ | |
return _audio; | |
} | |
} | |
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
float rayDist = 0.1; | |
RaycastHit hitA, hitB; | |
hitA = Physics.Raycast( | |
transform.position + transform.up * rayDist * 2, | |
transform.forward, | |
Mathf.Infinity, | |
layerMask | |
); |