Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Gulev AGulev

View GitHub Profile
@AGulev
AGulev / remove_unused_png.py
Last active Mar 8, 2018
Python script for removing unused PNG files from the Defold project
View remove_unused_png.py
import os, sys, hashlib, stat
import deftree, configparser
PROJECT_FILE = "game.project"
def all_files(ending):
# Generator to get files
for root, folders, files in os.walk(project_root):
for f in files:
if f.endswith(ending):
@AGulev
AGulev / remove_duplicates_in_flipbook.py
Last active Mar 8, 2018
Python script for removing duplicates in flipbook animation in Defold project
View remove_duplicates_in_flipbook.py
import os, sys, hashlib
import deftree
def all_files(ending):
# Generator to get files
for root, folders, files in os.walk(project_root):
for f in files:
if f.endswith(ending):
yield os.path.join(root, f)
@AGulev
AGulev / swipe_mouse.lua
Created Jul 29, 2016
adoptation of swipe-direction script by ScottPhillips https://github.com/ScottPhillips/swipe-direction/blob/master/swipe-direction.lua for Defold engine using mouse_trigger instead touch_trigger
View swipe_mouse.lua
local beginX
local beginY
local endX
local endY
local startTime = 0
local xDistance
local yDistance
View HaxeReinstall
#!/bin/sh
set -e
rm -rf /usr/local/bin/neko
rm -rf /usr/local/bin/nekoc
rm -rf /usr/local/lib/neko
rm -rf /usr/local/lib/libneko.dylib
rm -rf /usr/local/bin/haxe
rm -rf /usr/local/bin/nekotools
rm -rf /usr/local/bin/haxelib
@AGulev
AGulev / DrawState.hx
Last active Aug 29, 2015
HaxeFlixel state в котором реализовано простое рисование с физикой. Русские комментарии. http://agulev.com/risovanie-s-fizikoj-na-haxeflixel/
View DrawState.hx
import flixel.addons.nape.FlxNapeSprite;
import flixel.addons.nape.FlxNapeState;
import flixel.FlxCamera;
import flixel.FlxG;
import flixel.ui.FlxButton;
import flixel.util.FlxColor;
import flixel.util.FlxMath;
import flixel.util.FlxPoint;
import flixel.util.FlxSpriteUtil;
import Math;