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
/** | |
* \brief Returns positional offset for a given point as a result of summing 4 gerstner waves | |
* \param positionWS point in world space | |
* \param wavelengths wavelength of each of the 4 waves | |
* \param amplitudes amplitudes of each of the 4 waves | |
* \param directions direction of each of the 4 waves (each row = one direction). MUST BE NORMALIZED! | |
* \param speed global speed multiplier. Individual wave speed depends on Wavelength | |
* \param steepness Gerstner wave 'Steepness' parameter. Modulates the horizontal offset of points | |
* \param normal returns the normal of given point. | |
* \return positional offset of the given point |
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.Generic; | |
using System.Linq; | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
using UnityEngine.Localization; | |
using UnityEngine.Localization.Pseudo; | |
using UnityEngine.Localization.Settings; | |
#if UNITY_EDITOR |
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; | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
using UnityEngine.Localization.SmartFormat.Core.Extensions; | |
using UnityEngine.Localization.SmartFormat.PersistentVariables; | |
namespace InputHints | |
{ | |
internal struct InputActionVariable : IVariableValueChanged | |
{ |
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
{ | |
"Version": 3, | |
"Vars": { | |
"Player": { | |
"RunSpeed": 3.0, | |
"WalkSpeed": 1.5, | |
"CrippledSpeed": 0.5, | |
"FallHardHeight": 4.0, | |
"HorizontalClimbSpeed": 1.0, | |
"VerticalClimbSpeed": 1.0, |
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 os | |
import sys | |
import warnings | |
import random | |
import numpy as np | |
import pandas as pd | |
from keras import backend as K | |
from keras.models import Sequential |
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; | |
using UnityEngine.Assertions; | |
using UnityEditor; | |
using System.Linq; | |
using System.IO; | |
using System.Reflection; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Somefile |
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
/* By Thomas "noio" van den Berg | |
Add this script to the UI.Buttons that form | |
a left/right arrow pair. For each button, | |
drag the *other* button into the "other" field. | |
It requires that your buttons are animated using | |
"Transition: Animation", (not Sprite Swap) with an | |
animator that has the default Trigger parameters defined | |
("Normal", "Highlighted", "Pressed") |
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
public static Sprite GetSpriteWithWordReplaced(Sprite sprite, string word, string replaceBy) | |
{ | |
string assetPath = AssetDatabase.GetAssetPath(sprite); | |
string spriteName = sprite.name; | |
string newName = spriteName.Replace(word, replaceBy); | |
string newPath = assetPath.Replace(word, replaceBy); | |
foreach (Object assetObject in AssetDatabase.LoadAllAssetsAtPath(newPath)) | |
{ | |
Sprite newSprite = assetObject as Sprite; |
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
IEnumerator Shoot() { | |
while (true) | |
{ | |
Debug.Log("Shoot!"); | |
yield return new WaitForSeconds(1.0f); | |
} | |
} | |
void WalkAwayMan() { | |
Debug.Log("Walking Away"); |
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
#!/usr/bin/env python | |
import sys, os | |
import numpy as np | |
from matplotlib import cm | |
from scipy import ndimage, misc, spatial | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' | |
ENDC = '\033[0m' |
NewerOlder