Update moon
This commit is contained in:
parent
8b012de054
commit
182fc3e8a5
BIN
android/game.apk
BIN
android/game.apk
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="love.to.android1127120145"
|
<manifest package="love.to.android1127131258"
|
||||||
android:versionCode="15"
|
android:versionCode="15"
|
||||||
android:versionName="0.9.2"
|
android:versionName="0.9.2"
|
||||||
android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
@ -12,13 +12,13 @@
|
|||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="Game 1127120145"
|
android:label="Game 1127131258"
|
||||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
||||||
<service android:name=".DownloadService" />
|
<service android:name=".DownloadService" />
|
||||||
<activity
|
<activity
|
||||||
android:name="LtaActivity"
|
android:name="LtaActivity"
|
||||||
android:configChanges="orientation|screenSize"
|
android:configChanges="orientation|screenSize"
|
||||||
android:label="Game 1127120145"
|
android:label="Game 1127131258"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:screenOrientation="landscape" >
|
android:screenOrientation="landscape" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="love.to.android1127120145"
|
<manifest package="love.to.android1127131258"
|
||||||
android:versionCode="15"
|
android:versionCode="15"
|
||||||
android:versionName="0.9.2"
|
android:versionName="0.9.2"
|
||||||
android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
@ -12,13 +12,13 @@
|
|||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="Game 1127120145"
|
android:label="Game 1127131258"
|
||||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
||||||
<service android:name=".DownloadService" />
|
<service android:name=".DownloadService" />
|
||||||
<activity
|
<activity
|
||||||
android:name="LtaActivity"
|
android:name="LtaActivity"
|
||||||
android:configChanges="orientation|screenSize"
|
android:configChanges="orientation|screenSize"
|
||||||
android:label="Game 1127120145"
|
android:label="Game 1127131258"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:screenOrientation="landscape" >
|
android:screenOrientation="landscape" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#Last build type
|
#Last build type
|
||||||
#Sun, 27 Nov 2016 12:01:51 +0100
|
#Sun, 27 Nov 2016 13:13:05 +0100
|
||||||
|
|
||||||
build.last.target=debug
|
build.last.target=debug
|
||||||
|
|
||||||
|
Binary file not shown.
@ -1,9 +1,9 @@
|
|||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes.dex : \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes.dex : \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127120145/BuildConfig.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127131258/BuildConfig.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127120145/LtaActivity.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127131258/LtaActivity.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127120145/R$attr.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127131258/R$attr.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127120145/R$drawable.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127131258/R$drawable.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127120145/R.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android1127131258/R.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/org/libsdl/app/DummyEdit.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/org/libsdl/app/DummyEdit.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$1.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$1.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$2.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$2.class \
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,9 +1,9 @@
|
|||||||
# view AndroidManifest.xml #generated:45
|
# view AndroidManifest.xml #generated:45
|
||||||
-keep class love.to.android1127120145.DownloadActivity { <init>(...); }
|
-keep class love.to.android1127131258.DownloadActivity { <init>(...); }
|
||||||
|
|
||||||
# view AndroidManifest.xml #generated:17
|
# view AndroidManifest.xml #generated:17
|
||||||
-keep class love.to.android1127120145.DownloadService { <init>(...); }
|
-keep class love.to.android1127131258.DownloadService { <init>(...); }
|
||||||
|
|
||||||
# view AndroidManifest.xml #generated:18
|
# view AndroidManifest.xml #generated:18
|
||||||
-keep class love.to.android1127120145.LtaActivity { <init>(...); }
|
-keep class love.to.android1127131258.LtaActivity { <init>(...); }
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/gen/love/to/android1127120145/R.java \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/gen/love/to/android1127131258/R.java \
|
||||||
: /Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/res/drawable-xxhdpi/ic_launcher.png \
|
: /Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/res/drawable-xxhdpi/ic_launcher.png \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/AndroidManifest.xml \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/AndroidManifest.xml \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** Automatically generated file. DO NOT MODIFY */
|
/** Automatically generated file. DO NOT MODIFY */
|
||||||
package love.to.android1127120145;
|
package love.to.android1127131258;
|
||||||
|
|
||||||
public final class BuildConfig {
|
public final class BuildConfig {
|
||||||
public final static boolean DEBUG = true;
|
public final static boolean DEBUG = true;
|
@ -5,7 +5,7 @@
|
|||||||
* should not be modified by hand.
|
* should not be modified by hand.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package love.to.android1127120145;
|
package love.to.android1127131258;
|
||||||
|
|
||||||
public final class R {
|
public final class R {
|
||||||
public static final class attr {
|
public static final class attr {
|
@ -1,4 +1,4 @@
|
|||||||
package love.to.android1127120145;
|
package love.to.android1127131258;
|
||||||
import org.love2d.android.GameActivity;
|
import org.love2d.android.GameActivity;
|
||||||
|
|
||||||
public class LtaActivity extends GameActivity {}
|
public class LtaActivity extends GameActivity {}
|
@ -12,7 +12,7 @@ function asteroids.load(game)
|
|||||||
}
|
}
|
||||||
asteroids.num = game.level * 5
|
asteroids.num = game.level * 5
|
||||||
asteroids.max_speed = 5
|
asteroids.max_speed = 5
|
||||||
-- Generate asteroids
|
-- Make asteroids
|
||||||
asteroids.bodys = {}
|
asteroids.bodys = {}
|
||||||
for i = 1, asteroids.num do
|
for i = 1, asteroids.num do
|
||||||
make_asteroid(i, game, true)
|
make_asteroid(i, game, true)
|
||||||
|
32
assets/scripts/moon.lua
Normal file
32
assets/scripts/moon.lua
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
local tools = require 'assets/scripts/tools'
|
||||||
|
|
||||||
|
moon = {}
|
||||||
|
|
||||||
|
function moon.load(game)
|
||||||
|
local imgs = {
|
||||||
|
love.graphics.newImage('assets/sprites/moon/body1.png'),
|
||||||
|
love.graphics.newImage('assets/sprites/moon/body2.png'),
|
||||||
|
love.graphics.newImage('assets/sprites/moon/body3.png')
|
||||||
|
}
|
||||||
|
moon.img = imgs[math.random(1, tools.table_length(imgs))]
|
||||||
|
moon.x = 0
|
||||||
|
moon.y = game.canvas.height - moon.img:getHeight()
|
||||||
|
moon.bodys = {}
|
||||||
|
-- Repeat
|
||||||
|
if moon.img:getWidth() < game.window.width then
|
||||||
|
for i = 1, math.ceil(game.window.width / moon.img:getWidth()) do
|
||||||
|
moon.bodys[i] = (i - 1) * moon.img:getWidth()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function moon.update()
|
||||||
|
end
|
||||||
|
|
||||||
|
function moon.draw(game)
|
||||||
|
for key, tile in pairs(moon.bodys) do
|
||||||
|
love.graphics.draw(moon.img, tile, moon.y)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return moon
|
BIN
assets/sprites/moon/body1.png
Executable file
BIN
assets/sprites/moon/body1.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
assets/sprites/moon/body2.png
Executable file
BIN
assets/sprites/moon/body2.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
assets/sprites/moon/body3.png
Executable file
BIN
assets/sprites/moon/body3.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
Before Width: | Height: | Size: 58 KiB |
4
main.lua
4
main.lua
@ -2,6 +2,7 @@ local game = require 'assets/scripts/game'
|
|||||||
local background = require 'assets/scripts/background'
|
local background = require 'assets/scripts/background'
|
||||||
local spaceship = require 'assets/scripts/spaceship'
|
local spaceship = require 'assets/scripts/spaceship'
|
||||||
local asteroids = require 'assets/scripts/asteroids'
|
local asteroids = require 'assets/scripts/asteroids'
|
||||||
|
local moon = require 'assets/scripts/moon'
|
||||||
local controls = require 'assets/scripts/controls'
|
local controls = require 'assets/scripts/controls'
|
||||||
local camera = require 'assets/scripts/camera'
|
local camera = require 'assets/scripts/camera'
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ function love.load()
|
|||||||
camera.load(game)
|
camera.load(game)
|
||||||
background.load(game)
|
background.load(game)
|
||||||
asteroids.load(game)
|
asteroids.load(game)
|
||||||
|
moon.load(game)
|
||||||
spaceship.load(game)
|
spaceship.load(game)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -19,6 +21,7 @@ function love.update(dt)
|
|||||||
game.world:update(dt)
|
game.world:update(dt)
|
||||||
background.update(dt)
|
background.update(dt)
|
||||||
asteroids.update(dt, game)
|
asteroids.update(dt, game)
|
||||||
|
moon.update()
|
||||||
spaceship.update(dt)
|
spaceship.update(dt)
|
||||||
camera.update(game, spaceship)
|
camera.update(game, spaceship)
|
||||||
controls.update(dt)
|
controls.update(dt)
|
||||||
@ -28,6 +31,7 @@ end
|
|||||||
function love.draw()
|
function love.draw()
|
||||||
camera.gcam:draw(function(l,t,w,h)
|
camera.gcam:draw(function(l,t,w,h)
|
||||||
background.draw()
|
background.draw()
|
||||||
|
moon.draw()
|
||||||
spaceship.draw()
|
spaceship.draw()
|
||||||
asteroids.draw()
|
asteroids.draw()
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user