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
import shutil | |
import os | |
Import('env') | |
android_files = [ | |
'os_android.cpp', | |
'godot_android.cpp', | |
'file_access_android.cpp', |
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 newSanta(): | |
var santa = res.instance() | |
santa_count += 1 | |
var name = "santa"+str(santa_count) | |
santa.set_name(name) | |
add_child(santa) | |
list_of_stuff.push_back(name) | |
print("Object owner is: "+ str(santa.get_owner()) + \ | |
"This node's owner is: "+ str(get_owner())) | |
santa.set_owner(self) |
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
extends Node2D | |
var rock_points = 0 | |
var rock_res = preload("res://rock.scn") | |
var time_passed = 0 | |
# Used only to create a unique rock name | |
var rock_count = 0 | |
func _ready(): |
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
var lookup_table = {} | |
#***************************************************************** | |
func getDictParam(param): | |
return lookup_table[param] | |
#***************************************************************** | |
func _ready(): | |
lookup_table["pond"] = "Frog" | |
lookup_table["grass"] = "Dog" |
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
var test = null | |
#***************************************************************** | |
func _ready(): | |
# This works fine | |
if(test != null): | |
# Free resources etc | |
# ... | |
print("not null") |
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
#***************************************************************** | |
# In this game, there's a valid node called "Chair" | |
# - This will print "node isn't null" therefore verifying our | |
# assumptions that queue_free will not null the reference | |
# - You can even use the reference before this function is | |
# done executing (but don't do this in a real game) | |
func _ready(): | |
var node = get_node("Chair") | |
if(node != null): | |
# This will not null our reference. |
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
/** Matrix values for orientation */ | |
static final int ACCELEROMETER_AXIS_SWAP[][] = { | |
{1, -1, 0, 1}, // ROTATION_0 | |
{-1, -1, 1, 0}, // ROTATION_90 | |
{-1, 1, 0, 1}, // ROTATION_180 | |
{1, 1, 1, 0}}; // ROTATION_270 | |
//***************************************************************************** | |
@Override |
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
# The ship is from: <div xmlns:cc="http://creativecommons.org/ns#" about="http://millionthvector.blogspot.com/p/free-sprites.html"><a rel="cc:attributionURL" property="cc:attributionName" href="http://millionthvector.blogspot.com/p/free-sprites.html">MillionthVector</a> / <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div> | |
# The Background is from: http://www.jpl.nasa.gov/spaceimages/details.php?id=PIA16883 | |
extends Node2D | |
export var ship_speed = 100 | |
export var acceleration = 10 | |
var current_speed = Vector2(0,0) |
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
#version 110 | |
//---------------------------------------------- | |
// Environment Vertex Shader | |
//---------------------------------------------- | |
varying vec3 ReflectDir; | |
varying float LightIntensity; | |
uniform vec3 LightPos; | |
// Eye position in world cordinates | |
uniform vec3 eye_pos; |
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
E/WindowState( 561): getStack: Window{1cf21765 u0 kanankh.nutcopter.atlantra/com.gamesalad.player.GSGameWrapperActivity} couldn't find taskId=1198 Callers=com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner:9603 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedLoop:8662 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLocked:8604 com.android.server.wm.WindowManagerService.executeAppTransition:4107 | |
E/WindowState( 561): getStack: Window{1cf21765 u0 kanankh.nutcopter.atlantra/com.gamesalad.player.GSGameWrapperActivity} couldn't find taskId=1198 Callers=com.android.server.wm.WindowState.getDisplayContent:762 com.android.server.wm.WindowStateAnimator.updateSurfaceWindowCrop:1255 com.android.server.wm.WindowStateAnimator.setSurfaceBoundariesLocked:1430 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner:9691 | |
E/WindowState( 561): getStack: Window{1cf21765 u0 kanankh.nutcopter.atlantra/com.gamesala |
OlderNewer