Skip to content

Instantly share code, notes, and snippets.

iphone =
{
plist =
{
CFBundleIconFile = "Icon.png",
CFBundleIconFiles =
{
"Icon.png",
"Icon@2x.png",
"Icon-60.png",
iphone =
{
plist =
{
CFBundleIconFile = "Icon.png",
CFBundleIconFiles =
{
... -- see above
},
UILaunchImages = {
settings = {
plugins =
{
["facebook"] =
{
publisherId = "com.coronalabs"
},
},
}
local function fireLasers()
local blaster = display.newImageRect("laserbeam.png", 8,24)
blaster.x = ship.x
blaster.y = ship.y
transition.to(blaster, {time=1000, y = 0 })
end
local needToFire = false
local function handleEnterFrame( event )
local myText = display.newText( "Hello World", 200, 200, native.systemFont, 16 )
-- Callback function to handle the upload events that are generated.
-- There will be several events: one to indicate the start and end of the
-- process and several to indicate the progress (depends on the file size).
-- Always test for your error conditions!
local function uploadListener( event )
if ( event.isError ) then
print( "Network Error." )
-- This is likely a time out or server being down. In other words,
local widget = require( "widget" )
local myList
local myData = {}
myData[1] = { name="Fred", phone="555-555-1234" }
myData[2] = { name="Barney", phone="555-555-1235" }
myData[3] = { name="Wilma", phone="555-555-1236" }
myData[4] = { name="Betty", phone="555-555-1237" }
myData[5] = { name="Pebbles", phone="555-555-1238" }
myData[6] = { name="BamBam", phone="555-555-1239" }
math.randomseed( os.time() )
local function rollDice( dicePattern )
-- Dice pattern 3d6+3k3
-- First number : number of dice
-- d : required string
-- Second number : sides to the dice
-- +/- : optional modifier
-- ^/k : optional string; '^' keeps the high values, 'k' keeps the low values
-- Third number : number of dice to keep, i.e. 4d6^3 keeps the best three numbers
--
-- Abstract: Hello World sample app.
--
-- Version: 1.2
--
-- Sample code is MIT licensed
-- Copyright (C) 2014 Corona Labs Inc. All Rights Reserved.
--
-- Supports Graphics 2.0
------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using TextTutorial.Resources;