Update moon

This commit is contained in:
Andros Fenollosa 2016-11-27 13:25:40 +01:00
parent 8b012de054
commit 182fc3e8a5
29 changed files with 56 additions and 20 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="love.to.android1127120145"
<manifest package="love.to.android1127131258"
android:versionCode="15"
android:versionName="0.9.2"
android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android">
@ -12,13 +12,13 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="Game 1127120145"
android:label="Game 1127131258"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<service android:name=".DownloadService" />
<activity
android:name="LtaActivity"
android:configChanges="orientation|screenSize"
android:label="Game 1127120145"
android:label="Game 1127131258"
android:launchMode="singleTop"
android:screenOrientation="landscape" >
<intent-filter>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="love.to.android1127120145"
<manifest package="love.to.android1127131258"
android:versionCode="15"
android:versionName="0.9.2"
android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android">
@ -12,13 +12,13 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="Game 1127120145"
android:label="Game 1127131258"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<service android:name=".DownloadService" />
<activity
android:name="LtaActivity"
android:configChanges="orientation|screenSize"
android:label="Game 1127120145"
android:label="Game 1127131258"
android:launchMode="singleTop"
android:screenOrientation="landscape" >
<intent-filter>

View File

@ -1,5 +1,5 @@
#Last build type
#Sun, 27 Nov 2016 12:01:51 +0100
#Sun, 27 Nov 2016 13:13:05 +0100
build.last.target=debug

View File

@ -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/love/to/android1127120145/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/android1127120145/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/android1127120145/R.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/android1127131258/LtaActivity.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/android1127131258/R$drawable.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/SDLActivity$1.class \
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$2.class \

View File

@ -1,9 +1,9 @@
# view AndroidManifest.xml #generated:45
-keep class love.to.android1127120145.DownloadActivity { <init>(...); }
-keep class love.to.android1127131258.DownloadActivity { <init>(...); }
# view AndroidManifest.xml #generated:17
-keep class love.to.android1127120145.DownloadService { <init>(...); }
-keep class love.to.android1127131258.DownloadService { <init>(...); }
# view AndroidManifest.xml #generated:18
-keep class love.to.android1127120145.LtaActivity { <init>(...); }
-keep class love.to.android1127131258.LtaActivity { <init>(...); }

View File

@ -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/bin/AndroidManifest.xml \

View File

@ -1,5 +1,5 @@
/** Automatically generated file. DO NOT MODIFY */
package love.to.android1127120145;
package love.to.android1127131258;
public final class BuildConfig {
public final static boolean DEBUG = true;

View File

@ -5,7 +5,7 @@
* should not be modified by hand.
*/
package love.to.android1127120145;
package love.to.android1127131258;
public final class R {
public static final class attr {

View File

@ -1,4 +1,4 @@
package love.to.android1127120145;
package love.to.android1127131258;
import org.love2d.android.GameActivity;
public class LtaActivity extends GameActivity {}

View File

@ -12,7 +12,7 @@ function asteroids.load(game)
}
asteroids.num = game.level * 5
asteroids.max_speed = 5
-- Generate asteroids
-- Make asteroids
asteroids.bodys = {}
for i = 1, asteroids.num do
make_asteroid(i, game, true)

32
assets/scripts/moon.lua Normal file
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

View File

@ -2,6 +2,7 @@ local game = require 'assets/scripts/game'
local background = require 'assets/scripts/background'
local spaceship = require 'assets/scripts/spaceship'
local asteroids = require 'assets/scripts/asteroids'
local moon = require 'assets/scripts/moon'
local controls = require 'assets/scripts/controls'
local camera = require 'assets/scripts/camera'
@ -11,6 +12,7 @@ function love.load()
camera.load(game)
background.load(game)
asteroids.load(game)
moon.load(game)
spaceship.load(game)
end
@ -19,6 +21,7 @@ function love.update(dt)
game.world:update(dt)
background.update(dt)
asteroids.update(dt, game)
moon.update()
spaceship.update(dt)
camera.update(game, spaceship)
controls.update(dt)
@ -28,6 +31,7 @@ end
function love.draw()
camera.gcam:draw(function(l,t,w,h)
background.draw()
moon.draw()
spaceship.draw()
asteroids.draw()
end)