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
func snake2camel(string:String)->String: | |
var result = PoolStringArray() | |
var prev_is_underscore = false | |
for ch in string: | |
if ch=='_': | |
prev_is_underscore = true | |
else: | |
if prev_is_underscore: | |
result.append(ch.to_upper()) |
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
# Modified from http://codetuto.com/2015/05/using-httpclient-in-godot/ | |
# Added POST and Optional Header Perimeter | |
extends Node | |
var reqlist = [] | |
class request: | |
var t | |
var params | |
var finished = false |
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
void Update () { | |
// Handle native touch events | |
foreach (Touch touch in Input.touches) { | |
HandleTouch(touch.fingerId, Camera.main.ScreenToWorldPoint(touch.position), touch.phase); | |
} | |
// Simulate touch events from mouse events | |
if (Input.touchCount == 0) { | |
if (Input.GetMouseButtonDown(0) ) { | |
HandleTouch(10, Camera.main.ScreenToWorldPoint(Input.mousePosition), TouchPhase.Began); |