Skip to content

Commit

Permalink
Xay dung chuc nang luu diem qua mang
Browse files Browse the repository at this point in the history
  • Loading branch information
hocchuc committed Dec 9, 2016
1 parent a3630bc commit f29e315
Show file tree
Hide file tree
Showing 57 changed files with 4,325 additions and 4 deletions.
1 change: 0 additions & 1 deletion a

This file was deleted.

Binary file added bk/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-Small-40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-hdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-ldpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-mdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-xhdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-xxhdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/Icon-xxxhdpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bk/audio/splat.wav
Binary file not shown.
192 changes: 192 additions & 0 deletions bk/build.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
settings =
{
orientation =
{
default = "landscapeLeft",
supported = { "landscapeRight", "landscapeLeft" }
},
android =
{
usesPermissions =
{
"android.permission.INTERNET",
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.WRITE_EXTERNAL_STORAGE",
"com.android.vending.BILLING",
"com.android.vending.CHECK_LICENSE",
},
googlePlayGamesAppId = "xxxxxxxxxxxx",
--largeHeap = true
},
plugins =
{
-- key is the name passed to Lua's 'require()'
["plugin.google.iap.v3"] =
{
-- required
publisherId = "com.coronalabs",
supportedPlatforms = { android = true },
},
-- key is the name passed to Lua's 'require()'
["CoronaProvider.native.popup.social"] =
{
-- required
publisherId = "com.coronalabs",
},
["plugin.google.play.services"] =
{
publisherId = "com.coronalabs",
supportedPlatforms = { android=true }
},
-- Google play game services
["CoronaProvider.gameNetwork.google"] =
{
publisherId = "com.coronalabs",
supportedPlatforms = { android=true },
},
["CoronaProvider.gameNetwork.apple"] =
{
publisherId = "com.coronalabs",
supportedPlatforms = { iphone=true, ["iphone-sim"]=true },
},
},
iphone =
{
plist =
{
CFBundleIconFiles =
{
"Icon-60.png",
"[email protected]",
"[email protected]",
"Icon-76.png",
"[email protected]",
"[email protected]",
"Icon-Small-40.png",
"[email protected]",
"[email protected]",
},
UILaunchImages = {
{ --iPhone 4 Portait
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default",
["UILaunchImageOrientation"] = "Portrait",
["UILaunchImageSize"] = "{320, 480}"
},
{ --iPhone 4 LandscapeLeft
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default",
["UILaunchImageOrientation"] = "LandscapeLeft",
["UILaunchImageSize"] = "{320, 480}"
},
{ --iPhone 4 LandscapeRight
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default",
["UILaunchImageOrientation"] = "LandscapeRight",
["UILaunchImageSize"] = "{320, 480}"
},
{ --iPhone 5 Portait
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default-568h",
["UILaunchImageOrientation"] = "Portrait",
["UILaunchImageSize"] = "{320, 568}"
},
{ --iPhone 5 LandscapeLeft
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default-568h",
["UILaunchImageOrientation"] = "LandscapeLeft",
["UILaunchImageSize"] = "{320, 568}"
},
{ --iPhone 5 LandscapeRight
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default-568h",
["UILaunchImageOrientation"] = "LandscapeRight",
["UILaunchImageSize"] = "{320, 568}"
},
{ -- iPad / iPad Retina
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default-Portrait",
["UILaunchImageOrientation"] = "Portrait",
["UILaunchImageSize"] = "{768, 1024}"
},
{ -- iPad / iPad Retina
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default-Landscape",
["UILaunchImageOrientation"] = "LandscapeLeft",
["UILaunchImageSize"] = "{768, 1024}"
},
{ -- iPad / iPad Retina
["UILaunchImageMinimumOSVersion"] = "7.0",
["UILaunchImageName"] = "Default-Landscape",
["UILaunchImageOrientation"] = "LandscapeRight",
["UILaunchImageSize"] = "{768, 1024}"
},
{ --iPhone 6 Portrait
["UILaunchImageMinimumOSVersion"] = "8.0",
["UILaunchImageName"] = "Default-667h",
["UILaunchImageOrientation"] = "Portrait",
["UILaunchImageSize"] = "{375, 667}"
},
{ --iPhone 6 LandscapeLeft
["UILaunchImageMinimumOSVersion"] = "8.0",
["UILaunchImageName"] = "Default-667h",
["UILaunchImageOrientation"] = "LandscapeLeft",
["UILaunchImageSize"] = "{375, 667}"
},
{ --iPhone 6 LandscapeRight
["UILaunchImageMinimumOSVersion"] = "8.0",
["UILaunchImageName"] = "Default-667h",
["UILaunchImageOrientation"] = "LandscapeRight",
["UILaunchImageSize"] = "{375, 667}"
},
{ -- iPhone 6 Plus Portrait
["UILaunchImageMinimumOSVersion"] = "8.0",
["UILaunchImageName"] = "Default-736h",
["UILaunchImageOrientation"] = "Portrait",
["UILaunchImageSize"] = "{414, 736}"
},
{ -- iPhone 6 Plus landscape left
["UILaunchImageMinimumOSVersion"] = "8.0",
["UILaunchImageName"] = "Default-Landscape-736h",
["UILaunchImageOrientation"] = "LandscapeLeft",
["UILaunchImageSize"] = "{414, 736}"
},
{ -- iPhone 6 Plus landscape right
["UILaunchImageMinimumOSVersion"] = "8.0",
["UILaunchImageName"] = "Default-Landscape-736h",
["UILaunchImageOrientation"] = "LandscapeRight",
["UILaunchImageSize"] = "{414, 736}"
}
},
UIApplicationExitsOnSuspend = false, -- must be false for single sign-on to work
--[[
FacebookAppID = "XXXXXXXXXXXXXXXX", -- replace XXXXXXXXX with your facebook appId
CFBundleURLTypes =
{
{
CFBundleURLSchemes =
{
"fbXXXXXXXXXXXXXX", -- replace XXXXXXXXX with your facebook appId

}
}
},
--]]
--[[
UIAppFonts =
{
"immortal.ttf",
"district.ttf",
"carbontype.ttf",
"Agency.ttf",
"AgencyFB-Bold.ttf",
},
--]]
}
},
excludeFiles =
{
iphone = { 'Icon-*dpi.png', 'audio/*.oog' },
android = { 'Icon.png', 'Icon-6*.png', 'Icon-7*.png', 'Icon-Small*.png', '[email protected]', '[email protected]', 'audio/*.m4a' }
},
}
22 changes: 22 additions & 0 deletions bk/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--calculate the aspect ratio of the device:
local aspectRatio = display.pixelHeight / display.pixelWidth

application = {
content = {
width = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ),
height = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ),
scale = "letterbox",
fps = 60,

imageSuffix = {
["@2x"] = 2.0,
["@4x"] = 4.0,
},
},
license = {
google = {
key = "reallylonggooglelicensekeyhere",
policy = "serverManaged",
},
},
}
78 changes: 78 additions & 0 deletions bk/device.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
-- Project: Simple device detection flags
--
-- File name: main.lua
--
-- Author: Corona Labs
--
-- Abstract: Sets up some simple boolean flags that lets us do various device tests.
--
--
-- Target devices: simulator, device
--
-- Sample code is MIT licensed, see http://www.coronalabs.com/links/code/license
-- Copyright (C) 2012 Corona Labs Inc. All Rights Reserved.
---------------------------------------------------------------------------------------
local M = {}

--
-- Set up some defaults
--

M.isApple = false
M.isAndroid = false
M.isGoogle = false
M.isKindleFire = false
M.isNook = false
M.is_iPad = false
M.isTall = false
M.isSimulator = false

local model = system.getInfo("model")

-- Are we on the simulator?

if "simulator" == system.getInfo("environment") then
M.isSimulator = true
end

-- lets see if we are a tall device

M.isTall = false
if (display.pixelHeight/display.pixelWidth) > 1.5 then
M.isTall = true
end

-- first, look to see if we are on some Apple platform.
-- All models start with iP, so we can check that.

if string.sub(model,1,2) == "iP" then
-- We are an iOS device of some sort
M.isApple = true

if string.sub(model, 1, 4) == "iPad" then
M.is_iPad = true
end
else
-- Not Apple, then we must be one of the Android devices
M.isAndroid = true

-- lets assume we are Google for the moment
M.isGoogle = true

-- All the Kindles start with K, though Corona SDK before build 976's Kindle Fire 9 returned "WFJWI" instead of "KFJWI"

if model == "Kindle Fire" or model == "WFJWI" or string.sub(model,1,2) == "KF" then
M.isKindleFire = true
M.isGoogle = false
end

-- Are we a nook?

if string.sub(model,1,4) == "Nook" or string.sub(model,1,4) == "BNRV" or string.sub(model,1,4) == "BNTV" then
M.isNook = true
M.isGoogle = false
end
end

return M

Loading

0 comments on commit f29e315

Please sign in to comment.