Skip to content

Instantly share code, notes, and snippets.

--# Shot
--shot
ShotList={}
function AddShot(p,d,s)
table.insert(ShotList,{start=p,pos=p,dir=d,speed=s})
end
--# Shot
--shot
ShotList={}
function AddShot(p,d,s)
table.insert(ShotList,{start=p,pos=p,dir=d,speed=s})
end
@dermotbalson
dermotbalson / gist:d5a2f56d34e2450686fb
Created October 26, 2015 13:48
Tank 5f shooting with angles
--# Shot
--shot
ShotList={}
function AddShot(p,d,s)
table.insert(ShotList,{start=p,pos=p,dir=d,speed=s})
end
@dermotbalson
dermotbalson / gist:0dff8777b2571e77e08f
Created October 26, 2015 06:24
Tank 5d shooting seems to work
--# Shot
--shot
ShotList={}
function AddShot(p,d,s)
table.insert(ShotList,{start=p,pos=p,dir=d,speed=s})
end
@dermotbalson
dermotbalson / gist:60af2d3369aab8f2922d
Created October 26, 2015 03:19
Tank 5c shooting controls
--# Shot
--shot
Shot=class()
function Shot:init(p,d,s)
self.startPos=p
self.pos=p
self.dir=d
@dermotbalson
dermotbalson / gist:a86ac94bc1aef027e517
Created October 25, 2015 02:00
Tank 5b controls all working
--# Shot
--shot
Shot=class()
function Shot:init(p,d,s)
self.startPos=p
self.pos=p
self.dir=d
@dermotbalson
dermotbalson / gist:b450482070de75c4bebf
Created October 22, 2015 02:23
Tank 5a in progress
--# Test
--[
function setup()
img=readImage("Dropbox:3D-grass2x"):copy(0,50,25,50)
b1=CreateBlock(10,5,5,color(255,255,0),nil,img)
b2=CreateBlock(10,5,5,color(255),nil,img) --b2:setColors(color(100,0,0))
b1.pos=vec3(0,0,100) b1.a=0
b2.pos=vec3(0,0,0) b2.a=40
s=vec3(10,5,5)
--# Test
--[
function setup()
img=readImage("Dropbox:3D-grass2x"):copy(0,50,25,50)
b1=CreateBlock(10,5,5,color(255,255,0),nil,img)
b2=CreateBlock(10,5,5,color(255),nil,img) --b2:setColors(color(100,0,0))
b1.pos=vec3(0,0,100) b1.a=0
b2.pos=vec3(0,0,0) b2.a=40
s=vec3(10,5,5)
--# Test
--[
function setup()
img=readImage("Dropbox:3D-grass2x"):copy(0,50,25,50)
b1=CreateBlock(10,5,5,color(255,255,0),nil,img)
b2=CreateBlock(10,5,5,color(255),nil,img) --b2:setColors(color(100,0,0))
b1.pos=vec3(0,0,100) b1.a=0
b2.pos=vec3(0,0,0) b2.a=40
s=vec3(10,5,5)
--# Test
--[
function setup()
img=readImage("Platformer Art:Block Grass"):copy(0,50,25,50)
b1=CreateBlock(10,5,5,color(255,255,0),nil,img)
b2=CreateBlock(10,5,5,color(255),nil,img) --b2:setColors(color(100,0,0))
b1.pos=vec3(0,0,100) b1.a=0
b2.pos=vec3(0,0,0) b2.a=40
s=vec3(10,5,5)