This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local beginX | |
local beginY | |
local endX | |
local endY | |
local startTime = 0 | |
local xDistance | |
local yDistance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local beginX | |
local beginY | |
local endX | |
local endY | |
local startTime | |
local xDistance | |
local yDistance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Формула: | |
=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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std = "max" | |
files['.luacheckrc'].global = false | |
unused_args = false | |
globals = { | |
"sys", | |
"go", | |
"gui", | |
"label", | |
"render", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using System.Collections.Generic; | |
using UnityEditor.AnimatedValues; | |
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)] | |
[CanEditMultipleObjects] | |
public class CustomEditorBase : Editor | |
{ |
NewerOlder