Skip to content

Instantly share code, notes, and snippets.

View kone9's full-sized avatar
😀
Happy to use free software

Ariel Gimenez kone9

😀
Happy to use free software
View GitHub Profile
@RKiemGames
RKiemGames / networked_connect.gd
Created May 22, 2020 23:47
Persistent client connection
extends Node
class_name NetworkedConnect
var _connected_to_server = false
var _connection_alive = Timer.new()
var _host
var _port
var _debug = false
@RKiemGames
RKiemGames / audiogen.gd
Last active May 11, 2020 17:20
Godot Audio Generator
extends Node2D
var playback = null
var phase = 0.1
const hz = 1024
const notes = {'s':0.01,'do':0.8,'re':0.9,'mi':1.01,'fa':1.06,'sol':1.18,'la':1.34,'si':1.52}
# Q: DO, W: RE, E: MI, R: FA, T: SOL, Y: LA, U: SI
const keys = {81:'do',87:'re',69:'mi',82:'fa',84:'sol',89:'la',85:'si'}
@kone9
kone9 / port_animation_tree_animations.gd
Created December 21, 2019 00:41 — forked from RKiemGames/port_animation_tree_animations.gd
Porting AnimationTree animations to another AnimationTree
func _ready():
for anim in $AnimationPlayer2.get_animation_list():
$AnimationPlayer.add_animation(anim, $AnimationPlayer2.get_animation(anim))
#example: running animations ported
$AnimationPlayer.connect("animation_finished", self, "rotate_anim")
$AnimationPlayer.play("test1")
func rotate_anim(anim_name):
$AnimationPlayer.play("test2")
@RKiemGames
RKiemGames / port_animation_tree_animations.gd
Created December 21, 2019 00:14
Porting AnimationTree animations to another AnimationTree
func _ready():
for anim in $AnimationPlayer2.get_animation_list():
$AnimationPlayer.add_animation(anim, $AnimationPlayer2.get_animation(anim))
#example: running animations ported
$AnimationPlayer.connect("animation_finished", self, "rotate_anim")
$AnimationPlayer.play("test1")
func rotate_anim(anim_name):
$AnimationPlayer.play("test2")