An entity is just a number.
There is a graph of components, indexed by the entity id.
All state is stored in one place.
var components = { Position: {}, Velocity:{}, Spite: {}, Timer: {}, ScreenShake: {}, RemoveComponents: {} }| /* | |
| * Author: David Robert Nadeau | |
| * Site: http://NadeauSoftware.com/ | |
| * License: Creative Commons Attribution 3.0 Unported License | |
| * http://creativecommons.org/licenses/by/3.0/deed.en_US | |
| */ | |
| #if defined(_WIN32) | |
| #include <Windows.h> | |
| #elif defined(__unix__) || defined(__unix) || defined(unix) || (defined(__APPLE__) && defined(__MACH__)) |
| function logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |
| // BitwiseOperations.glsl | |
| const int BIT_COUNT = 8; | |
| int modi(int x, int y) { | |
| return x - y * (x / y); | |
| } | |
| int or(int a, int b) { | |
| int result = 0; |
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| /* CSS */ | |
| <!-- | |
| This disables app transport security and allows non-HTTPS requests. | |
| Note: it is not recommended to use non-HTTPS requests for sensitive data. A better | |
| approach is to fix the non-secure resources. However, this patch will work in a pinch. | |
| To apply the fix in your Ionic/Cordova app, edit the file located here: | |
| platforms/ios/MyApp/MyApp-Info.plist | |
| And add this XML right before the end of the file inside of the last </dict> entry: |
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
| -- download.lua by Michael Weingarden May 2014 | |
| local dropbox = require("dropboxModule") | |
| local widget = require( "widget" ) | |
| -- Load the relevant LuaSocket modules (no additional files required for these) | |
| local http = require("socket.http") | |
| local ltn12 = require("ltn12") | |
| _H = display.contentHeight |
| /* | |
| Original idea from | |
| http://www.acloudtree.com/how-to-shove-data-into-postgres-using-goroutinesgophers-and-golang/ | |
| */ | |
| package main | |
| import ( | |
| "log" | |
| "time" | |
| "os" |