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
Sub Click(X as integer, Y as integer) | |
//Clicking on an object on screen selects it in the listbox as well as on screen | |
dim Obj As PD3DObject | |
dim ChrgObj As ChargedObject | |
dim index,i As integer | |
Obj = PD3DObject(Me.PickedObj(X,Y)) //get the object clicked on | |
if (Obj <> nil) then | |
if Obj isA ChargeSphere then //the user has selected a charge config | |
ChrgObj = ChargeSphere(Obj).parent //trace back from the individual charge to its ChrgObj | |
for i=0 to ubound(ChrgObjList) |
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
-- 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 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 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
Car = class() | |
-- 2D Physics game made in Codea by @juaxix | |
-- More games: xixgames.com | |
-- 21/07/2012 | |
-- inspired by Codea Physics tutorial and Crayon Physics :) | |
function Car:init(x,y) | |
local car = physics.body(POLYGON, vec2(-50,10), vec2(-50,-10), vec2(50,-10), vec2(50,10), vec2(30,10),vec2(25,25),vec2(-25,25),vec2(-30,10)) | |
car.position = vec2(x, y) | |
debugDraw:addBody(car) | |
car.density = 2.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
-- | |
-- xixgames.com | |
-- LGPL | |
-- basis | |
width = WIDTH | |
height = HEIGHT | |
-- images | |
buffer = image(width,height) | |
snapshot = image(width,height) | |
-- arrays |
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
BezierCurve = class() | |
function BezierCurve:init() | |
self:generate_new_bezier() | |
end | |
function BezierCurve:draw() | |
for i=1,(#self.curve)-1 do | |
line(self.curve[i].x,self.curve[i].y,self.curve[i+1].x,self.curve[i+1].y) |
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
// | |
// aGameCenter_Codea.h | |
// | |
// Created by Juan Belón on 28/05/12 | |
// Games -> http://www.xixgames.com | |
// LGPL - @juaxix - Codea connection! | |
// | |
#import <Foundation/Foundation.h> | |
#import <GameKit/GameKit.h> |
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
-- Class EnemyHorde | |
-- Speed Shooting Earth | |
-- A freesource game project using Codea and Google Maps | |
-- More games: xixgames.com | |
-- by @juaxix | |
-- 6/6/2012 | |
ENEMY_SPAWN_EASY = 0 | |
ENEMY_SPAWN_HARD = 1 |
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
/** | |
Video: http://www.youtube.com/watch?v=gk8VQnXiyog | |
*/ | |
global proc moveEach() | |
{ | |
int $inc[]= | |
{ | |
18, | |
44, | |
74 |
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
Boss = class() | |
-- Bosses | |
BOSS_MAIN = 1 | |
BOSS_ALT = 2 | |
-- Boss states | |
BOSS_DEAD = 1 | |
BOSS_ALIVE = 2 | |
BOSS_DAMAGED = 3 | |
function Boss:init(_position,_type,limit_position,_velocity) | |
self.position = _position |