This file contains hidden or 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
| -- destructable | |
| -- Use this function to perform your initial setup | |
| function setup() | |
| parameter.boolean("addWater",false) | |
| defaultGravity = physics.gravity() | |
| parameter.boolean("useGravity",false, function(v) | |
| if v then | |
| physics.gravity(Gravity) | |
| else |
This file contains hidden or 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
| Boid = class() | |
| -- constructor used by fish | |
| function Boid:init( _location, _maxSpeed, _maxForce) | |
| self.velocity = vec2( math.random( -maxSpeed, maxSpeed ), math.random( -maxSpeed, maxSpeed ) ) | |
| self:createBoid(_location, _maxSpeed, _maxForce) | |
| end | |
| -- constructor used by bubbles | |
| --[[ |
This file contains hidden or 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
| --# Emitter | |
| Emitter = class() | |
| function Emitter:init(args) | |
| self.particleMesh = mesh() | |
| self.particleMesh.texture = args.tex | |
| self.minLife = args.minLife or 1 | |
| self.maxLife = args.maxLife or 1 | |
| self.spread = args.spread or 360 |
This file contains hidden or 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
| -- multiplatform Game made for Ludum Dare using Stonetrip ShiVa 3D Engine | |
| -- More info: http://www.ludumdare.com/compo/ludum-dare-25/?action=preview&uid=10960 | |
| -- Support developer from XIXGAMES: http://www.xixgames.com @juaxix | |
| -------------------------------------------------------------------------------- | |
| function alien.onInit ( ) | |
| -------------------------------------------------------------------------------- | |
| sensor.setActiveAt ( this.getObject ( ),0,false ) | |
This file contains hidden or 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 "SharingAddon.h" | |
| #import "StandaloneCodeaViewController.h" | |
| #import "lua.h" | |
| #import "lauxlib.h" | |
| #pragma mark - Lua Functions | |
| static int share(struct lua_State *L); | |
| static int email(struct lua_State *L); |
This file contains hidden or 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 <Foundation/Foundation.h> | |
| #import <MessageUI/MessageUI.h> | |
| #import "CodeaAddon.h" | |
| @interface SharingAddon : CodeaAddon<MFMailComposeViewControllerDelegate> | |
| + (instancetype) sharedInstance; | |
| @end |
This file contains hidden or 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
| --# block | |
| block = class() | |
| function block:init(x,y,z,dim) | |
| -- you can accept and set parameters here | |
| --use parameters to define all vertices needed to make a cube | |
| self.verts={ | |
| vec3(x+dim/2,y-dim/2,z+dim/2), |
This file contains hidden or 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
| --[[ | |
| Perspective v2.0.2 | |
| A library for easily and smoothly integrating a virtual camera into your game. | |
| Based on modified version of the Dusk camera system. | |
| v2.0.2 adds a more stable tracking system and re-implements scrollX and scrollY | |
| --]] |
This file contains hidden or 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
| --# Main | |
| -- Markdown Codea | |
| -- by Yojimbo2000 | |
| displayMode(FULLSCREEN) | |
| function setup() | |
| setText() | |
| y,vel = 0,0 | |
| scrollY={} --store deltas for smooth scrolling upon finger release | |
| end |
This file contains hidden or 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
| --# Main | |
| -- Disintegration Shader | |
| supportedOrientations(LANDSCAPE_ANY) | |
| function setup() | |
| -- parameter.watch("grav") | |
| -- parameter.watch("gravBack") --for bug-checking the get local point function | |
| print ("tilt to spin the sphere \ntap the screen to explode / unexplode the mesh") | |
| aerial = color(28, 27, 54, 255) | |
| verts = Isosphere(5) |