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
function setup() | |
t={"This is some ","fancily colored ","text message thingy,","which is a ","mixture ","of ","several totally different ","colors, for your delectation",} | |
c={color(0),color(255,0,0),color(0,0,255),color(0),color(255,255,0),color(255), | |
color(255, 0, 0, 255),color(0)} | |
p=WriteText(t,c,300,300,18) | |
end | |
function draw() | |
background(150) | |
sprite(p,500,500) |
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
-- 3D basic | |
-- Use this function to perform your initial setup | |
function setup() | |
local dirtBlock = Block() | |
local grassBlock = Block() | |
grassBlock.cube.texture = "Planet Cute:Grass Block" |
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
--# Main | |
--Main | |
--This program contains over 20 mini-projects created by dave1707 to answer questions asked in the forum | |
--** How to run the projects ** | |
--When you run the program, you can select any of these projects by number using the slider at upper left | |
--(Underneath the slider you will see a textbox with descriptions of what each numbered project does) |
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
--# Main | |
--Main | |
--This code manages which Code tab is run | |
--it remembers your last choice, and if you select a different one, it runs that instead | |
--This has nothing to do with 3D lighting and you can ignore it completely | |
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
--# Notes | |
--This project shows to use some basic physics, from bouncing balls and spinning | |
--rectangles, to the basics of a very simple platform game | |
--HOW TO USE THIS PROJECT | |
--There are a number of tabs at the top. Press on a tab to see its code. |
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
--# Notes | |
--This is a simulation of an old puzzle game | |
--where you have a flat plastic surface with balls that roll around on it | |
--there are little holes you have to get the balls into by tipping the puzzle to roll the balls | |
--but there are obstacles, and if you tip too far, the balls come out again | |
--in this version, we'll start to build the puzzle, and when we add more than one ball, we'll | |
--start using physics to manage the ball collisions |
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 self = require("sdk/self"); | |
var widgets = require("sdk/widget"); | |
var tabs = require("sdk/tabs"); | |
//this section provides clickable icon at bottom right of screen | |
var widget = widgets.Widget({ | |
id: "mozilla-link", | |
label: "Mozilla website", | |
contentURL: require("sdk/self").data.url("icon-16.png"), | |
onClick: GetUsers |
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
function setup() | |
Settings() | |
CreateBoard() | |
Initialise() | |
end | |
function Settings() | |
cellWidth,cellHeight,cellGap,textSize=100,133,10,48 | |
boardValues={ [0]={0,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
function setup() | |
Settings() | |
CreateBoard() | |
Initialise() | |
state=states.PLAY --NEW | |
end | |
function Settings() | |
states={PLAY=1,END=2} --NEW |
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
function setup() | |
Settings() | |
CreateBoard() | |
Initialise() | |
state=states.PLAY | |
end | |
function Settings() | |
states={PLAY=1,END=2} | |
dragXY=nil |