Commit e09305b2 authored by Luboš Horáček's avatar Luboš Horáček

#58 zobrazení šipek v únosu

parent 6e2f5e3d
......@@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="gen"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="src" path="/AndEngine-1.0.0-SNAPSHOT"/>
......@@ -19,5 +18,6 @@
<classpathentry exported="true" kind="lib" path="/home/lhoracek/.gradle/caches/modules-2/files-2.1/com.google.inject/guice/3.0/28586dc97c525501329d9a242fc3402041e3572d/guice-3.0-no_aop.jar"/>
<classpathentry exported="true" kind="lib" path="/home/lhoracek/workspace/tablexia/libs/activeandroid-3.1-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="/home/lhoracek/workspace/tablexia/libs/support-v4-r13.jar"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
......@@ -12,4 +12,4 @@
# Project target.
target=android-19
android.library.reference.1=../AndEngine/AndEngine-GLES2-AnchorCenter
android.library.reference.1=libraries/AndEngine-1.0.0-SNAPSHOT
......@@ -177,7 +177,7 @@ public class UnosActivity extends GameActivity {
}
}
}
@Override
protected synchronized void onResume() {
super.onResume();
......@@ -569,16 +569,16 @@ public class UnosActivity extends GameActivity {
final TileGroup tileGroup = tileGroups.get(position);
if (nextDirection == Direction.NORTH_WEST) {
tileGroup.getNextNorhWestOut().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
tileGroup.getNextNorhWestOutPressed().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
// tileGroup.getNextNorhWestOutPressed().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
} else if (nextDirection == Direction.NORTH_EAST) {
tileGroup.getNextNorhEastOut().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
tileGroup.getNextNorhEastOutPressed().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
// tileGroup.getNextNorhEastOutPressed().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
} else if (nextDirection == Direction.SOUTH_EAST) {
tileGroups.get(position.getSouthEast()).getNextNorhWestIn().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
tileGroups.get(position.getSouthEast()).getNextNorhWestInPressed().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
// tileGroups.get(position.getSouthEast()).getNextNorhWestInPressed().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
} else if (nextDirection == Direction.SOUTH_WEST) {
tileGroups.get(position.getSouthWest()).getNextNorhEastIn().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
tileGroups.get(position.getSouthWest()).getNextNorhEastInPressed().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
// tileGroups.get(position.getSouthWest()).getNextNorhEastInPressed().setOnAreaTouchedListener(rightDirectionAreaTouchedListener);
}
}
}
......@@ -603,6 +603,12 @@ public class UnosActivity extends GameActivity {
hideSprite(tileGroups.get(position.getSouthWest()).getNextNorhEastInPressed());
}
private void showFlags(Sprite... sprites) {
for (Sprite sprite : sprites) {
sprite.setAlpha(1);
}
}
/**
* Schová sprite vyhodí z něj touchlistener, aby neviditelný sprite nereagoval na pohyby
*
......@@ -803,18 +809,22 @@ public class UnosActivity extends GameActivity {
if (fromDirection == Direction.NORTH_WEST) {
// NORTHEAST SOUTHEAST SOUTHWEST
String[] sounds = currentSoundPack.getSoundsInOrder(Direction.NORTH_EAST, Direction.SOUTH_EAST, Direction.SOUTH_WEST, nextDirection);
showFlags(ne, se, sw);
playSounds(sounds, ne, nep, se, sep, sw, swp);
} else if (fromDirection == Direction.NORTH_EAST) {
// SOUTHEAST SOUTHWEST NORTH WEST
String[] sounds = currentSoundPack.getSoundsInOrder(Direction.SOUTH_EAST, Direction.SOUTH_WEST, Direction.NORTH_WEST, nextDirection);
showFlags(se, sw, nw);
playSounds(sounds, se, sep, sw, swp, nw, nwp);
} else if (fromDirection == Direction.SOUTH_EAST) {
// SOUTHWEST NORTHWEST NORTHEAST
String[] sounds = currentSoundPack.getSoundsInOrder(Direction.SOUTH_WEST, Direction.NORTH_WEST, Direction.NORTH_EAST, nextDirection);
showFlags(sw, nw, ne);
playSounds(sounds, sw, swp, nw, nwp, ne, nep);
} else if (fromDirection == Direction.SOUTH_WEST) {
// NORTHWEST NORTHEAST SOUTHEAST
String[] sounds = currentSoundPack.getSoundsInOrder(Direction.NORTH_WEST, Direction.NORTH_EAST, Direction.SOUTH_EAST, nextDirection);
showFlags(nw, ne, se);
playSounds(sounds, nw, nwp, ne, nep, se, sep);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment