Skip to content

Instantly share code, notes, and snippets.

View tollyx's full-sized avatar

Adrian Hedqvist tollyx

View GitHub Profile
@tollyx
tollyx / tween-to-origo.gd
Created February 28, 2018 10:15
Godot hpysics-process tweening script
extends Spatial
var curr_frame_global = Transform()
var prev_frame = Transform()
var time_spent = 0
onready var time_duration = get_physics_process_delta_time()
func _enter_tree():
transform = Transform()
curr_frame_global = global_transform

Keybase proof

I hereby claim:

  • I am tollyx on github.
  • I am tollyx (https://keybase.io/tollyx) on keybase.
  • I have a public key ASCWwmY8gNIVZwYr1vw45fBHMSN0dJWLlfDeo_9B2tKxYAo

To claim this, I am signing this object:

@tollyx
tollyx / gamestates.lua
Created October 10, 2016 22:54
Very basic, probably bad in some way gamestate module
local gamestates = {}
gamestates.debug = false
function gamestates:init (initialstate)
self.stack = {}
self.num = 0
self:clear(initialstate)
end
function gamestates:update (dt)
@tollyx
tollyx / svnmovefix.lua
Last active August 17, 2016 13:23
Fixes the svn history for multiple files when they've been moved without using 'svn move'
--
-- Fixes the svn history for multiple files
-- when they've been moved without using 'svn move'
--
-- It does not work on files that has been renamed
--
-- It works by looking for missing and untracked files with matching file names,
-- moving the untracked file to the missing files location and then moving it back
-- using svn move.
--