Implemented ToolShopTutorial
This commit is contained in:
@ -6,6 +6,7 @@ import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -49,4 +50,12 @@ public class PriceButton {
|
||||
layout.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void startAnimation(Animation animation){
|
||||
layout.startAnimation(animation);
|
||||
}
|
||||
|
||||
public void clearAnimation(){
|
||||
layout.clearAnimation();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package de.frajul.endlessroll.views;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -89,4 +90,13 @@ public class ToolInspector implements View.OnClickListener {
|
||||
onToolUpgraded(toolType.getUpgradePrice());
|
||||
}
|
||||
}
|
||||
|
||||
public void startPriceButtonAnimation(Animation animation){
|
||||
priceButton.startAnimation(animation);
|
||||
}
|
||||
|
||||
public void clearPriceButtonAnimation(){
|
||||
priceButton.clearAnimation();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ import android.widget.TextView;
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.main.GameActivity;
|
||||
import de.frajul.endlessroll.main.screens.Screen;
|
||||
import de.frajul.endlessroll.main.tutorial.ToolShopTutorial;
|
||||
import de.frajul.endlessroll.user.User;
|
||||
|
||||
/**
|
||||
@ -21,6 +20,7 @@ public class TopBar implements View.OnClickListener {
|
||||
|
||||
private GameActivity gameActivity;
|
||||
private View layout;
|
||||
private Screen.ScreenType parent;
|
||||
|
||||
private Animation starDecreaseAnimation;
|
||||
private Animation energyDecreaseAnimation;
|
||||
@ -38,6 +38,7 @@ public class TopBar implements View.OnClickListener {
|
||||
|
||||
public TopBar(GameActivity gameActivity, Screen.ScreenType parent, View layout) {
|
||||
this.gameActivity = gameActivity;
|
||||
this.parent = parent;
|
||||
this.layout = layout;
|
||||
|
||||
starDecreaseAnimation = AnimationUtils.loadAnimation(gameActivity, R.anim.decrease);
|
||||
@ -92,10 +93,11 @@ public class TopBar implements View.OnClickListener {
|
||||
starCount.setText(user.getStarCount() + "");
|
||||
energyCount.setText(user.getEnergyCount() + "");
|
||||
|
||||
if (gameActivity.getTutorialManager().getToolShopTutorial()
|
||||
.getState() == ToolShopTutorial.ToolShopTutorialState.TO_TOOLSHOP && toolshopButton
|
||||
.isEnabled())
|
||||
toolshopButton.startAnimation(toolShopPulse);
|
||||
gameActivity.getTutorialManager().getToolShopTutorial().onTopBarUpdate(this);
|
||||
}
|
||||
|
||||
public void startToolShopButtonPulse(){
|
||||
toolshopButton.startAnimation(toolShopPulse);
|
||||
}
|
||||
|
||||
public void showStarcountDecrease(int decrease) {
|
||||
@ -118,4 +120,12 @@ public class TopBar implements View.OnClickListener {
|
||||
gameActivity.flipToScreen(Screen.ScreenType.SETTINGS);
|
||||
}
|
||||
}
|
||||
|
||||
public Screen.ScreenType getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public boolean isToolShopButtonEnabled(){
|
||||
return toolshopButton.isEnabled();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user