This commit is contained in:
Andros Fenollosa 2016-11-04 18:12:38 +01:00
parent 20b7769ca0
commit 73cec1f153
23 changed files with 81 additions and 73 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest package="love.to.android1104173735" <manifest package="love.to.android1104181206"
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 1104173735" android:label="Game 1104181206"
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 1104173735" android:label="Game 1104181206"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="landscape" > android:screenOrientation="landscape" >
<intent-filter> <intent-filter>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest package="love.to.android1104173735" <manifest package="love.to.android1104181206"
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 1104173735" android:label="Game 1104181206"
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 1104173735" android:label="Game 1104181206"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="landscape" > android:screenOrientation="landscape" >
<intent-filter> <intent-filter>

View File

@ -1,5 +1,5 @@
#Last build type #Last build type
#Fri, 04 Nov 2016 17:37:41 +0100 #Fri, 04 Nov 2016 18:12:11 +0100
build.last.target=debug build.last.target=debug

View File

@ -1,9 +1,9 @@
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes.dex : \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes.dex : \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104173735/BuildConfig.class \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104181206/BuildConfig.class \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104173735/LtaActivity.class \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104181206/LtaActivity.class \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104173735/R$attr.class \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104181206/R$attr.class \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104173735/R$drawable.class \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104181206/R$drawable.class \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104173735/R.class \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/love/to/android1104181206/R.class \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/org/libsdl/app/DummyEdit.class \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/org/libsdl/app/DummyEdit.class \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$1.class \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$1.class \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$2.class \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/classes/org/libsdl/app/SDLActivity$2.class \

View File

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

View File

@ -1,3 +1,3 @@
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/gen/love/to/android1104173735/R.java \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/gen/love/to/android1104181206/R.java \
: /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/res/drawable-xxhdpi/ic_launcher.png \ : /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/res/drawable-xxhdpi/ic_launcher.png \
/Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/AndroidManifest.xml \ /Users/androsfenollosa/www/alunizaje/StartGamedev-160604-osx/tools/love-android-sdl2/bin/AndroidManifest.xml \

View File

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

View File

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

View File

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

View File

@ -33,6 +33,8 @@ function love.load()
ship.shape = love.physics.newCircleShape(20) ship.shape = love.physics.newCircleShape(20)
ship.fixture = love.physics.newFixture(ship.body, ship.shape, 1) ship.fixture = love.physics.newFixture(ship.body, ship.shape, 1)
ship.fixture:setRestitution(0.9) ship.fixture:setRestitution(0.9)
ship.time_start = 1
start_time = 0
-- Fire -- Fire
fire = {} fire = {}
fire.img = love.graphics.newImage('assets/sprite/fire.png') fire.img = love.graphics.newImage('assets/sprite/fire.png')
@ -116,6 +118,7 @@ end
-- UPDATE -- UPDATE
function love.update(dt) function love.update(dt)
start_time = dt + start_time
-- Sprite -- Sprite
if not explosion.finish and explosion.active then -- Explosion if not explosion.finish and explosion.active then -- Explosion
explosion.time = explosion.time + dt explosion.time = explosion.time + dt
@ -144,6 +147,7 @@ function love.update(dt)
fire.pos_frame = 1 fire.pos_frame = 1
end end
-- Controls -- Controls
if start_time > ship.time_start then
control_up, control_right, control_left, control_quit = false, false, false, false control_up, control_right, control_left, control_quit = false, false, false, false
-- Keyboard -- Keyboard
if love.keyboard.isDown('escape') or love.keyboard.isDown('q') then if love.keyboard.isDown('escape') or love.keyboard.isDown('q') then
@ -171,6 +175,7 @@ function love.update(dt)
control_left = true control_left = true
end end
end end
end
-- Ship move -- Ship move
if control_up then if control_up then
ship.body:applyForce(0, -ship.power) ship.body:applyForce(0, -ship.power)
@ -291,6 +296,7 @@ function love.draw()
love.graphics.draw(explosion.img, explosion.frames[explosion.pos_frame], ship.body:getX(), ship.body:getY() + ship.img:getHeight() / 2) love.graphics.draw(explosion.img, explosion.frames[explosion.pos_frame], ship.body:getX(), ship.body:getY() + ship.img:getHeight() / 2)
end end
-- Controls -- Controls
if start_time > ship.time_start then
-- Up -- Up
button_up.y = level.y + (camera.height / 4) + -camera.y button_up.y = level.y + (camera.height / 4) + -camera.y
local button_frame_up = button.frames[1] local button_frame_up = button.frames[1]
@ -321,6 +327,7 @@ function love.draw()
if debug then if debug then
love.graphics.rectangle('fill', button_left.x, button_left.y, button.img:getWidth(), button.img:getHeight()) love.graphics.rectangle('fill', button_left.x, button_left.y, button.img:getWidth(), button.img:getHeight())
end end
end
-- Texts -- Texts
if not play and not win then -- Game over if not play and not win then -- Game over
love.graphics.print(text_restart.text, (camera.width / 2) - (text_restart.size / 2), -camera.y + (camera.height / 2)) love.graphics.print(text_restart.text, (camera.width / 2) - (text_restart.size / 2), -camera.y + (camera.height / 2))
@ -362,7 +369,7 @@ function restart(level_arg)
local temp_img = img_asteroide[math.random(1, table_length(img_asteroide))] local temp_img = img_asteroide[math.random(1, table_length(img_asteroide))]
asteroids[i] = { asteroids[i] = {
x = math.random(0, canvas.width - temp_img:getWidth()), x = math.random(0, canvas.width - temp_img:getWidth()),
y = math.random(200, canvas.height - temp_img:getHeight()), y = math.random(window.height / 2, canvas.height - temp_img:getHeight()),
speed = math.random(1, max_speed_asteroids), speed = math.random(1, max_speed_asteroids),
img = temp_img, img = temp_img,
angle = math.random(0, 90) angle = math.random(0, 90)
@ -372,6 +379,7 @@ function restart(level_arg)
ship.body = love.physics.newBody(world, (canvas.width / 2) - (ship.img:getWidth() / 2) , ship.y, 'dynamic') ship.body = love.physics.newBody(world, (canvas.width / 2) - (ship.img:getWidth() / 2) , ship.y, 'dynamic')
win = false win = false
play = true play = true
start_time = 0
end end
-- Controls -- Controls