View IconPNGAsAudio.gd
tool | |
extends AudioStreamPlayer | |
# "We were so preoccupied with whether or not we could, we didn’t stop to think if we should." | |
var sample_hz = 8000.0 # Adjust and enjoy the sound of nightmares | |
var playback: AudioStreamPlayback = null # Actual playback stream, assigned in _init(). | |
var _stream = PoolRealArray() | |
var stream_pos = 0 |
View Godot_unstable.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View RoundRobinPlayer.gd
tool | |
extends AudioStreamPlayer #exactly the same code should work for extending 2D and 3D versions | |
class_name RoundRobinPlayer | |
export(int, "sequence", "random", "shuffle") var queue_mode = 0 | |
export(Array, AudioStream) var playlist = [] setget _set_playlist, _get_playlist | |
export(bool) var round_robin_playing = false setget _set_playing, _is_playing # can't override properties so use this for animations | |
var playlist_index = -1 # current position in the playlist | |
var shuffled_indices = [] # Array<int> of shuffled playlist indices |
View some_singleton.gd
#You can add this to any singleton where you have helper classes and functions | |
class ShuffleBag: | |
var _shuffled_list | |
var _current_pos = -1 | |
func _init(array_from): | |
var _unshuffled = array_from.duplicate() | |
var _shuffled = [] | |
var _current_pos | |
# Pick a random element from the unshuffled list |
View script.cs
using Godot; | |
using System; | |
public class SharpBird : Node2D | |
{ | |
// Member variables here, example: | |
// private int a = 2; | |
// private string b = "textvar"; | |
private double direction; | |
Random r = new Random(); |
View draggableObject.gd
extends Node2D | |
signal picked | |
signal dropped | |
enum DRAGSTATES { PICKED, DROPPED } | |
var drag_state = DRAGSTATES.DROPPED | |
var prev_mouse_pos = Vector2(0,0) | |
var absolute_z = IntArray([0]) | |
var last_event |
View joycon-mappings.txt
Nintendo Switch Joycons use standard bluetooth technology and can be paired with a PC or phone by holding the power button between SL and SR while the console is off. | |
If your Switch can't find em after that just reattach them to the console and they'll pair up immediately. | |
Button scheme info obtained using http://html5gamepad.com and http://gamepadviewer.com | |
Joycon R: Wireless Gamepad (Vendor: 057e Product: 2007) | |
Switch, Generic, XBOX | |
SL, B4, LB | |
SR, B5, RB |
View PyxelEdit-LicenseFix.cmd
@echo OFF | |
echo.================================= | |
echo.PYXEL EDIT LICENSE FIX BY NOIDEXE | |
echo.Gist at https://goo.gl/hXVb7q | |
echo.Remember to run as admin | |
echo.================================= | |
echo. | |
set licensefile="C:\Program Files\PyxelEdit\Settings\LicenseKey.txt" | |
set licensefilex64="C:\Program Files (x86)\PyxelEdit\Settings\LicenseKey.txt" | |
set exepath="C:\Program Files\PyxelEdit\PyxelEdit.exe" |
View Iterador.cmd
REM Reemplaza las lineas echo por el comando del conversor | |
REM Copia este archivo a la carpeta donde esten los wavs y ejecutalo | |
@echo off | |
for %%f in (*.wav) do call:mifuncion %%f | |
GOTO:end | |
:mifuncion | |
echo.aca se convertiria %1 a mp3 | |
echo.aca se convertiria %1 a ogg |
View build-spigot-update.ps1
#To use just do: [Right Click]->[Run in PowerShell] | |
$source = "https://hub.spigotmc.org/jenkins/job/BuildTools-Beta/lastSuccessfulBuild/artifact/target/BuildTools.jar" | |
#Once the new BuildTools are out of beta chage the url above to: | |
#https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar | |
$destination = "BuildTools.jar" | |
Invoke-WebRequest $source -OutFile $destination |
NewerOlder