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
# ported from http://www.gizma.com/easing/ | |
# by http://th0ma5w.github.io | |
# | |
# untested :P | |
import math | |
linearTween = lambda t, b, c, d : c*t/d + b |
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 UnityEditor; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
using System.Reflection; | |
public class SelectPrefabsOfType : EditorWindow { | |
[MenuItem("Window/Prefab Finder")] |
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
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
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
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh | |
# Aliases | |
alias g='git' | |
#compdef g=git | |
alias gst='git status' | |
#compdef _git gst=git-status | |
alias gd='git diff' | |
#compdef _git gd=git-diff | |
alias gdc='git diff --cached' |
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
# Available only in the 2.2 legacy branch and posterior versions | |
func _ready(): | |
# The old way: | |
print("HELLO") # Code before the yield | |
# Setting up the yield: | |
var t = Timer.new() # Create a new Timer node | |
t.set_wait_time(5.5) # Set the wait time | |
add_child(t) # Add it to the node tree as the direct child |
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
# original code by CowThing: https://github.com/godotengine/godot/issues/6506 | |
# port to Godot 3 and bugfixes by atomius. | |
# usage: | |
# set this script as AutoLoad (Singleton enabled) | |
# | |
# in the project settings: | |
# [display] | |
# set 'window/size/width' and 'window/size/height' to your desired render resolution. | |
# set 'window/size/test_width' and 'window/size/test_height' to the initial window size. |
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
# Simple Utility Script | |
# Traps Mouse Cursor and hides it. | |
# ESCAPE to quit game | |
# F5 to reload current scene | |
# F9 to toggle collision shape dispay. Scene MUST be reloaded | |
# F10 to toggle fps Display | |
# F11 to switch from windowed to fullscreen | |
# F12 to take screenshot | |
# | |
# Works great for fps games |
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
extends RayCast2D | |
# If this is use to disable collisions | |
export(bool) var disable_collisions = false; | |
# What to set/remove collisions against | |
export(NodePath) var physics_path | |
var physics_object | |
func _ready(): |
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
shader_type spatial; | |
render_mode unshaded; | |
render_mode cull_disabled; | |
uniform float depth_distance = 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
# Loads a scene in the background using a seperate thread and a queue. | |
# Foreach new scene there will be an instance of ResourceInteractiveLoader | |
# that will raise an on_scene_loaded event once the scene has been loaded. | |
# Hooking the on_progress event will give you the current progress of any | |
# scene that is being processed in realtime. The loader also uses caching | |
# to avoid duplicate loading of scenes and it will prevent loading the | |
# same scene multiple times concurrently. | |
# | |
# Sample usage: | |
# |
OlderNewer