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
// | |
// AVMediaCharacteristic+Extensions.swift | |
// | |
// Created by Prokhor Kharchenko. | |
// | |
import AVFoundation | |
import MediaPlayer | |
extension AVMediaSelectionOption { |
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
; Hold 'Shift' to start the script, hold 'Control' to stop. | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
delay := 666 | |
isDisabled := true | |
Loop { | |
Sleep delay | |
if (GetKeyState("Control")) { |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[System.AttributeUsage(System.AttributeTargets.Field)] | |
public class StringToEnumAttribute : PropertyAttribute | |
{ | |
public string[] values; | |
public StringToEnumAttribute(params string[] values) |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
public class GameEventListener : MonoBehaviour | |
{ | |
public GameEvent @event; | |
public UnityEvent response; |
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.Generic; | |
[CreateAssetMenu(fileName = "GameEvent", menuName = "~/Assets/Scripts/GameEvent", order = 0)] | |
public class GameEvent : ScriptableObject | |
{ | |
private List<GameEventListener> listeners = new List<GameEventListener>(); | |
public void Raise() | |
{ | |
for (var i = listeners.Count - 1; i >= 0; i--) |
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> { } |
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; | |
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
using UnityEngine; | |
using System.Collections; | |
public static class GameObjectExtensions { | |
public static GameObject Instantiate(this Object prefab) { | |
return GameObject.Instantiate (prefab) as GameObject; | |
} | |
} |
NewerOlder