float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
return mix(rand(fl), rand(fl + 1.0), fc);
}
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 System.Linq; | |
using System.Collections.Generic; | |
public static class LinqExtensions { | |
public static T Random<T>(this IEnumerable<T> list) { | |
if (list != null && list.Any ()) | |
return list.ElementAt(UnityEngine.Random.Range(0, list.Count())); | |
return default(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
using UnityEngine; | |
using System.Collections; | |
public static class GameObjectExtensions { | |
public static GameObject Instantiate(this Object prefab) { | |
return GameObject.Instantiate (prefab) as GameObject; | |
} | |
} |
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 System.Collections; | |
using System; | |
public static class CoroutineExtensions { | |
public static void StartWaitForSeconds(this MonoBehaviour target, float seconds, Action completion) { | |
target.StartCoroutine (WaitForSeconds (seconds, completion)); | |
} |
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
module Fastlane | |
module Actions | |
module SharedValues | |
INSERT_BUILD_PHASES_CUSTOM_VALUE = :INSERT_BUILD_PHASES_CUSTOM_VALUE | |
end | |
class InsertBuildPhasesAction < Action | |
def self.run(params) | |
require 'xcodeproj' |
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; | |
[CreateAssetMenu(fileName = "FloatVariable", menuName = "~/Assets/Scripts/FloatVariable")] | |
public class FloatVariable : Variable<float> { } |
OlderNewer