Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Gulev AGulev

View GitHub Profile
@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;
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 / 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
@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 / 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 / delete_duplicate_sprites_in_atlases.py
Last active Mar 8, 2018
Python script for removing multi-adding same sprites to the non animated atlas in Defold project
View delete_duplicate_sprites_in_atlases.py
import os, sys, hashlib
import deftree
def all_files(ending, project_root):
# 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 / FBInstant.d.ts
Created Mar 15, 2018
Type definitions for FBInstant v2.1 (deprecated)
View FBInstant.d.ts
// Type definitions for FBInstant v2.1
// Api documentation : https://developers.facebook.com/docs/games/fbinstant-api
//
/**
* Top level namespace for the Instant Games SDK.
*/
declare var FBInstant:fbinstant.IFBInstant;
declare namespace fbinstant
{
@AGulev
AGulev / style-guide.md
Created Apr 27, 2018 — forked from dapetcu21/style-guide.md
Interrogation Style Guide
View style-guide.md

Lua style guide

Linting

This project makes use of [Luacheck] for catching common mistakes. Install it and configure it for your text editor.

Editor configuration

We recommend [Atom] for editing Lua code along with the following packages:

  • [linter-luacheck]: [Luacheck] integration
@AGulev
AGulev / builder.py
Created Apr 28, 2018 — forked from Jerakin/builder.py
For building and deploying Defold projects directly to your phone
View builder.py
"""
Builder is built by wrapping adb and storing some data locally
I would recommend to add an alias to your ~.bash_profile to use it easier
alias builder="python3.5 ~/Documents/repo/builder/builder.py"
Usage:
builder.py [command] [arguments]
Available Commands:
@AGulev
AGulev / bundle.sh
Last active May 16, 2018 — forked from britzl/bundle.sh
Script to build and bundle a Defold project for multiple platforms
View bundle.sh
#!/bin/bash
readonly java_path='java'
readonly output_path='build'
readonly email='my@email.com'
readonly auth_key='my_key'
readonly texture_compresstion='false'
readonly andr_key_path='key.pk8'
readonly andr_cert_path='certificate.pem'
You can’t perform that action at this time.