This project makes use of [Luacheck] for catching common mistakes. Install it and configure it for your text editor.
We recommend [Atom] for editing Lua code along with the following packages:
- [linter-luacheck]: [Luacheck] integration
Here is a simple manual about how to make a simple flappy bird-like game on Defold with code examples: | |
* A flappy bird-like game is a game where you have to control a bird that flies through gaps between pipes. The bird falls down because of gravity, but you can make it flap its wings and go up by tapping the screen or pressing a key. The game ends when the bird hits a pipe or the ground. The goal is to fly as far as possible and get a high score. | |
* To make a flappy bird-like game on Defold, you need to do these steps: | |
* Create a new project in Defold and name it “Flappy Bird”. | |
* Create a new collection file and name it “main.collection”. This will be the main scene of your game. | |
* Create a new game object file and name it “bird.go”. This will be the bird that the player controls. | |
* Add a sprite component to the bird game object and set the image to a bird image of your choice. You can use the built-in “hero.atlas” or import your own image. | |
* Add a script component to the bird game object and name |
local cfg = require "modules.onet.config" | |
local msgs = require "modules.msgs" | |
local M = {} | |
local list = {} | |
local callback_function | |
local function iap_listener(self, transaction, error) | |
if error == nil then |
function M.check_keys(callback) | |
local max_keys = data.BALANCE.CONST.max_key_counts[wallet.max_key_index] | |
if wallet.keys < max_keys then | |
local dif = 0 | |
local time_key | |
if uptime then | |
time_key = "last_key_use_time_cpu" | |
dif = uptime.get() - wallet.last_key_use_time_cpu + 1 | |
end | |
if dif <= 0 then |
Формула: | |
=IMPORTXML(CONCATENATE("http://www.nbrb.by/Services/XmlExRates.aspx?ondate=", TEXT(A1,"mm/dd/yyyy")),"/DailyExRates/Currency[@Id='145']/Rate/text()") | |
Нужно заменить A1 ячейкой с датой. | |
Валюты: | |
145 - USD | |
292 - EUR | |
298 - RUB |
""" | |
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: |
// 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 | |
{ |
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) |
# dupFinder.py | |
import os, sys, stat | |
import hashlib | |
def findDup(parentFolder): | |
# Dups in format {hash:[names]} | |
dups = {} | |
for dirName, subdirs, fileList in os.walk(parentFolder): | |
print('Scanning %s...' % dirName) | |
for filename in fileList: |
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) |