Add blink
This commit is contained in:
parent
0e70e85984
commit
a00e80ce23
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.android0106213437"
|
<manifest package="love.to.android0106213733"
|
||||||
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 0106213437"
|
android:label="Game 0106213733"
|
||||||
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 0106213437"
|
android:label="Game 0106213733"
|
||||||
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.android0106213437"
|
<manifest package="love.to.android0106213733"
|
||||||
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 0106213437"
|
android:label="Game 0106213733"
|
||||||
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 0106213437"
|
android:label="Game 0106213733"
|
||||||
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
|
||||||
#Fri, 06 Jan 2017 21:34:44 +0100
|
#Fri, 06 Jan 2017 21:37:38 +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/android0106213437/BuildConfig.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213733/BuildConfig.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213437/LtaActivity.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213733/LtaActivity.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213437/R$attr.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213733/R$attr.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213437/R$drawable.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213733/R$drawable.class \
|
||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213437/R.class \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/bin/classes/love/to/android0106213733/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.android0106213437.DownloadActivity { <init>(...); }
|
-keep class love.to.android0106213733.DownloadActivity { <init>(...); }
|
||||||
|
|
||||||
# view AndroidManifest.xml #generated:17
|
# view AndroidManifest.xml #generated:17
|
||||||
-keep class love.to.android0106213437.DownloadService { <init>(...); }
|
-keep class love.to.android0106213733.DownloadService { <init>(...); }
|
||||||
|
|
||||||
# view AndroidManifest.xml #generated:18
|
# view AndroidManifest.xml #generated:18
|
||||||
-keep class love.to.android0106213437.LtaActivity { <init>(...); }
|
-keep class love.to.android0106213733.LtaActivity { <init>(...); }
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/gen/love/to/android0106213437/R.java \
|
/Users/androsfenollosa/www/alunizaje/android/tools/love-android-sdl2/gen/love/to/android0106213733/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.android0106213437;
|
package love.to.android0106213733;
|
||||||
|
|
||||||
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.android0106213437;
|
package love.to.android0106213733;
|
||||||
|
|
||||||
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.android0106213437;
|
package love.to.android0106213733;
|
||||||
import org.love2d.android.GameActivity;
|
import org.love2d.android.GameActivity;
|
||||||
|
|
||||||
public class LtaActivity extends GameActivity {}
|
public class LtaActivity extends GameActivity {}
|
@ -10,9 +10,17 @@ function spaceship.load(game)
|
|||||||
body = {
|
body = {
|
||||||
x = 0,
|
x = 0,
|
||||||
y = 0,
|
y = 0,
|
||||||
power = 400,
|
power = 200,
|
||||||
size_collition = 28,
|
size_collition = 28,
|
||||||
polygons_collition = 8
|
polygons_collition = 8,
|
||||||
|
visible = true,
|
||||||
|
blink = {
|
||||||
|
active = false,
|
||||||
|
num_repeat = 5,
|
||||||
|
duration = 0.05,
|
||||||
|
num_count = 0,
|
||||||
|
time = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
body.width = 156
|
body.width = 156
|
||||||
body.height = 143
|
body.height = 143
|
||||||
@ -134,6 +142,25 @@ function spaceship.update(dt, game)
|
|||||||
x, y = body.body:getLinearVelocity()
|
x, y = body.body:getLinearVelocity()
|
||||||
body.body:setLinearVelocity(-x, y)
|
body.body:setLinearVelocity(-x, y)
|
||||||
end
|
end
|
||||||
|
-- Blink
|
||||||
|
if body.blink.active then
|
||||||
|
body.blink.time = body.blink.time + dt
|
||||||
|
if body.blink.time >= body.blink.duration then
|
||||||
|
body.blink.time = 0
|
||||||
|
if body.visible then
|
||||||
|
body.visible = false
|
||||||
|
if body.blink.num_count < body.blink.num_repeat then
|
||||||
|
body.blink.num_count = body.blink.num_count + 1
|
||||||
|
else
|
||||||
|
body.blink.num_count = 0
|
||||||
|
body.blink.active = false
|
||||||
|
body.visible = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
body.visible = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
-- Check if this ingame
|
-- Check if this ingame
|
||||||
local x, y = body.body:getPosition()
|
local x, y = body.body:getPosition()
|
||||||
if y < 0 then
|
if y < 0 then
|
||||||
@ -151,12 +178,13 @@ function spaceship.update(dt, game)
|
|||||||
body.body:setPosition(body.pos_center_x, y)
|
body.body:setPosition(body.pos_center_x, y)
|
||||||
game.play = true
|
game.play = true
|
||||||
game.die = false
|
game.die = false
|
||||||
|
body.blink.active = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function spaceship.draw(game)
|
function spaceship.draw(game)
|
||||||
if game.play then
|
if game.play and body.visible then
|
||||||
-- Lignt
|
-- Lignt
|
||||||
light.animation:draw(light.img, light.x, light.y)
|
light.animation:draw(light.img, light.x, light.y)
|
||||||
-- Spaceship
|
-- Spaceship
|
||||||
|
Loading…
Reference in New Issue
Block a user