Commit 62038657 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

Merge branch 'feature-safe-bonus-assets' into 'V3.7'

Feature safe bonus assets

See merge request !738
parents 3f823da8 9314e72a
......@@ -116,7 +116,7 @@ public class SafeAssets {
public static final String MEDIUM_HARD_LIGHT4_GREY = GFX_PATH + LIGHTS + "4grey";
//======== SAFE BONUS =============
public static final String KNIFE = GFX_PATH + BONUS + "knife";
public static final String TWEEZERS = GFX_PATH + BONUS + "tweezers";
public static final String BOOM = GFX_PATH + BONUS + "boom";
public static final String BONUS_BACKGROUND = GFX_PATH + BONUS + "background";
......
......@@ -41,6 +41,9 @@ import cz.nic.tablexia.screen.AbstractTablexiaScreen;
*/
public class BonusCableGroup extends Group {
public static final int TWEEZERS_WIDTH = 284;
public static final int TWEEZERS_HEIGHT = 179;
private Image finalSocket;
private SafeGame safeGame;
private SafeLightImage lightImage;
......@@ -115,15 +118,16 @@ public class BonusCableGroup extends Group {
}
public void cut(SequenceAction sa) {
Image knife = new Image(safeGame.getScreenTextureRegion(SafeAssets.KNIFE));
float knifeXPos = cable.getX() + (cable.getWidth()/2) -knife.getWidth()/2 + 30;
float knifeYPos = cable.getY() + cable.getHeight()/2;
knife.setPosition(knifeXPos, knifeYPos);
addActor(knife);
Image tweezers = new Image(safeGame.getScreenTextureRegion(SafeAssets.TWEEZERS));
tweezers.setSize(TWEEZERS_WIDTH, TWEEZERS_HEIGHT);
float tweezersXPos = cable.getX() + cable.getWidth();
float tweezersYPos = cable.getY() - tweezers.getHeight()/2 + 20;
tweezers.setPosition(tweezersXPos, tweezersYPos);
addActor(tweezers);
sa.addAction(Actions.sequence(Actions.run(new Runnable() {
@Override
public void run() {
knife.addAction(Actions.moveTo(knifeXPos, knifeYPos - knife.getHeight() - 20, 1f));
tweezers.addAction(Actions.moveTo(tweezersXPos - cable.getWidth()/2, tweezersYPos, 1f));
}
}), Actions.delay(1f),Actions.run(new Runnable() {
@Override
......
TestScenarioHallOfFameRobberyTrophies
TestScenarioHallOfFamePursuitTrophies
TestScenarioHallOfFameKidnappingTrophies
TestScenarioHallOfFameNightWatchTrophies
TestScenarioHallOfFameShootingRangeTrophies
TestScenarioHallOfFameInTheDarknessTrophies
TestScenarioHallOfFameCrimeSceneTrophies
TestScenarioHallOfFameRunesTrophies
TestScenarioHallOfFameProtocolTrophies
TestScenarioHallOfFameSafeTrophies
TestScenarioHeapOfTrophies
\ No newline at end of file
TestGameSafeBonusNoneStars
TestGameSafeBonusOneStars
TestGameSafeBonusTwoStars
TestGameSafeBonusThreeStars
\ No newline at end of file
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