First Tutorial added
This commit is contained in:
@ -31,6 +31,8 @@ import com.example.julian.endlessroll.user.User;
|
||||
import com.example.julian.endlessroll.views.LevelupMessage;
|
||||
import com.example.julian.endlessroll.views.TopBarData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Julian on 06.02.2016.
|
||||
*/
|
||||
@ -142,11 +144,11 @@ public class GameActivity extends Activity implements ExceptionHandler, User.LvU
|
||||
});
|
||||
}
|
||||
|
||||
public void showTutorialScreen(final BreakPoint breakPoint) {
|
||||
public void showTutorialScreen(final List<BreakPoint> breakPoints) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
tutorialView.show(breakPoint);
|
||||
tutorialView.show(breakPoints);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import com.example.julian.endlessroll.main.screens.Screen;
|
||||
import com.example.julian.endlessroll.main.tutorial.BreakPoint;
|
||||
import com.example.julian.endlessroll.main.tutorial.Tutorial;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Julian on 08.12.2015.
|
||||
*/
|
||||
@ -18,6 +20,6 @@ public interface GameHandler extends ExceptionHandler {
|
||||
|
||||
RelativeLayout getRootLayout();
|
||||
|
||||
void showTutorialScreen(BreakPoint breakPoint);
|
||||
void showTutorialScreen(List<BreakPoint> breakPoints);
|
||||
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.example.julian.endlessroll.main.GameLog;
|
||||
import com.example.julian.endlessroll.main.screens.Screen;
|
||||
import com.example.julian.endlessroll.main.tutorial.BreakPoint;
|
||||
import com.example.julian.endlessroll.main.tutorial.Tutorial;
|
||||
import com.example.julian.endlessroll.main.tutorial.TutorialManager;
|
||||
import com.example.julian.endlessroll.rendering.Rendering;
|
||||
import com.example.julian.endlessroll.sounds.SoundManager;
|
||||
import com.example.julian.endlessroll.user.LevelUpBounties;
|
||||
@ -61,6 +62,7 @@ public class Game extends Rendering<GameScene> {
|
||||
private List<Integer> collectedStars = new ArrayList<>();
|
||||
private boolean energyCollected;
|
||||
|
||||
private TutorialManager tutorialManager;
|
||||
private Tutorial currentTutorial;
|
||||
|
||||
public Game(GameHandler handler, TopBarData topBarData) throws Exception {
|
||||
@ -75,6 +77,7 @@ public class Game extends Rendering<GameScene> {
|
||||
particleSystem = new ParticleSystem(getContext());
|
||||
this.dataStorageHandler = topBarData.getDataStorageHandler();
|
||||
viewManager = new ViewManager(this, handler, topBarData);
|
||||
tutorialManager = new TutorialManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -103,7 +106,7 @@ public class Game extends Rendering<GameScene> {
|
||||
this.levelPack = levelPack;
|
||||
if (scene != null) {
|
||||
gameState = GameState.COUNTDOWN;
|
||||
currentTutorial = new Tutorial(new BreakPoint(5, R.layout.tutorial_test));
|
||||
currentTutorial = tutorialManager.getTutorial(level);
|
||||
collectedStars.clear();
|
||||
energyCollected = false;
|
||||
particleSystem.deleteAllSources();
|
||||
@ -155,10 +158,12 @@ public class Game extends Rendering<GameScene> {
|
||||
physics.applyGravity(scene, timer);
|
||||
scene.update(timer);
|
||||
collisionManager.update(physics, scene);
|
||||
currentTutorial.update(playerProgress);
|
||||
if (currentTutorial.isOverNewBreakPoint()) {
|
||||
gameState = GameState.PAUSED;
|
||||
handler.showTutorialScreen(currentTutorial.getCurrentBreakPoint());
|
||||
if (currentTutorial != null) {
|
||||
currentTutorial.update(playerProgress);
|
||||
if (currentTutorial.isOverNewBreakPoints()) {
|
||||
gameState = GameState.PAUSED;
|
||||
handler.showTutorialScreen(currentTutorial.getCurrentBreakPoints());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ import com.example.julian.endlessroll.main.game.Game;
|
||||
import com.example.julian.endlessroll.main.tutorial.BreakPoint;
|
||||
import com.example.julian.endlessroll.views.TopBarData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Julian on 08.02.2016.
|
||||
*/
|
||||
@ -73,8 +75,8 @@ public class GameScreen extends GLScreen<RelativeLayout> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showTutorialScreen(BreakPoint breakPoint) {
|
||||
activity.showTutorialScreen(breakPoint);
|
||||
public void showTutorialScreen(List<BreakPoint> breakPoints) {
|
||||
activity.showTutorialScreen(breakPoints);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -11,9 +11,9 @@ import android.view.View;
|
||||
public class BreakPoint {
|
||||
|
||||
private float x;
|
||||
private @LayoutRes int viewId;
|
||||
private @IdRes int viewId;
|
||||
|
||||
public BreakPoint(float x, @LayoutRes int viewId)
|
||||
public BreakPoint(float x, @IdRes int viewId)
|
||||
{
|
||||
this.x = x;
|
||||
this.viewId = viewId;
|
||||
@ -23,7 +23,7 @@ public class BreakPoint {
|
||||
return x;
|
||||
}
|
||||
|
||||
public int getViewId() {
|
||||
public @IdRes int getViewId() {
|
||||
return viewId;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
package com.example.julian.endlessroll.main.tutorial;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.example.julian.endlessroll.main.GameLog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@ -11,29 +14,51 @@ import java.util.List;
|
||||
|
||||
public class Tutorial {
|
||||
|
||||
private int levelId, levelPackId;
|
||||
private List<BreakPoint> breakPoints;
|
||||
|
||||
private int currentBreakPointId = -1;
|
||||
private boolean overNewBreakPoint;
|
||||
private List<Integer> currentBreakPointIds = new ArrayList<>();
|
||||
private int lastBreakPointId = -1;
|
||||
private boolean overNewBreakPoints;
|
||||
|
||||
public Tutorial(BreakPoint... breakPoints){
|
||||
public Tutorial(int levelId, int levelPackId, BreakPoint... breakPoints) {
|
||||
this.levelId = levelId;
|
||||
this.levelPackId = levelPackId;
|
||||
this.breakPoints = Arrays.asList(breakPoints);
|
||||
}
|
||||
|
||||
public void update(float playerProgress) {
|
||||
int nextBreakPoint = currentBreakPointId + 1;
|
||||
if (breakPoints.size() > nextBreakPoint && playerProgress >= breakPoints.get(nextBreakPoint).getX()) {
|
||||
currentBreakPointId++;
|
||||
overNewBreakPoint = true;
|
||||
} else
|
||||
overNewBreakPoint = false;
|
||||
playerProgress *= 2f;
|
||||
int nextBreakPoint = lastBreakPointId + 1;
|
||||
if (!currentBreakPointIds.isEmpty())
|
||||
currentBreakPointIds.clear();
|
||||
overNewBreakPoints = false;
|
||||
|
||||
while (breakPoints.size() > nextBreakPoint && playerProgress >= breakPoints.get(nextBreakPoint).getX()) {
|
||||
currentBreakPointIds.add(nextBreakPoint);
|
||||
lastBreakPointId = nextBreakPoint;
|
||||
nextBreakPoint++;
|
||||
overNewBreakPoints = true;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isOverNewBreakPoint() {
|
||||
return overNewBreakPoint;
|
||||
public boolean isOverNewBreakPoints() {
|
||||
return overNewBreakPoints;
|
||||
}
|
||||
|
||||
public BreakPoint getCurrentBreakPoint() {
|
||||
return breakPoints.get(currentBreakPointId);
|
||||
public List<BreakPoint> getCurrentBreakPoints() {
|
||||
List<BreakPoint> list = new ArrayList<>();
|
||||
for (int i : currentBreakPointIds) {
|
||||
list.add(breakPoints.get(i));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public int getLevelId() {
|
||||
return levelId;
|
||||
}
|
||||
|
||||
public int getLevelPackId() {
|
||||
return levelPackId;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
package com.example.julian.endlessroll.main.tutorial;
|
||||
|
||||
import com.example.julian.endlessroll.R;
|
||||
import com.example.julian.endlessroll.levels.Level;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Julian on 17.03.2017.
|
||||
*/
|
||||
|
||||
public class TutorialManager {
|
||||
|
||||
private List<Tutorial> tutorials;
|
||||
|
||||
public TutorialManager() {
|
||||
Tutorial t11 = new Tutorial(1, 1, new BreakPoint(0, R.id.tutorial_welcome),
|
||||
new BreakPoint(0, R.id.tutorial_tools), new BreakPoint(7, R.id.tutorial_place_ramp),
|
||||
new BreakPoint(21, R.id.tutorial_place_ramp_2));
|
||||
|
||||
tutorials = Arrays.asList(t11);
|
||||
}
|
||||
|
||||
public Tutorial getTutorial(Level level) {
|
||||
for(Tutorial tutorial : tutorials){
|
||||
if(tutorial.getLevelPackId() == level.getPackId() && tutorial.getLevelId() == level.getId())
|
||||
return tutorial;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -1,48 +1,58 @@
|
||||
package com.example.julian.endlessroll.main.tutorial;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.example.julian.endlessroll.R;
|
||||
import com.example.julian.endlessroll.main.GameActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Julian on 24.02.2017.
|
||||
*/
|
||||
|
||||
public class TutorialView implements View.OnClickListener{
|
||||
public class TutorialView implements View.OnClickListener {
|
||||
|
||||
private RelativeLayout layout;
|
||||
private View layout;
|
||||
private View currentView;
|
||||
private GameActivity activity;
|
||||
private LayoutInflater inflater;
|
||||
|
||||
public TutorialView(GameActivity activity){
|
||||
private List<BreakPoint> breakPoints;
|
||||
|
||||
public TutorialView(GameActivity activity) {
|
||||
this.activity = activity;
|
||||
inflater = LayoutInflater.from(activity);
|
||||
layout = new RelativeLayout(activity);
|
||||
layout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
LayoutInflater inflater = LayoutInflater.from(activity);
|
||||
layout = inflater.inflate(R.layout.tutorial, null);
|
||||
layout.setVisibility(View.GONE);
|
||||
layout.setOnClickListener(this);
|
||||
}
|
||||
|
||||
public RelativeLayout getLayout() {
|
||||
public View getLayout() {
|
||||
return layout;
|
||||
}
|
||||
|
||||
public void show(BreakPoint breakPoint){
|
||||
inflater.inflate(breakPoint.getViewId(), layout);
|
||||
public void show(List<BreakPoint> breakPoints) {
|
||||
this.breakPoints = breakPoints;
|
||||
showFirstBreakPoint();
|
||||
}
|
||||
|
||||
private void showFirstBreakPoint(){
|
||||
currentView = layout.findViewById(breakPoints.get(0).getViewId());
|
||||
currentView.setVisibility(View.VISIBLE);
|
||||
layout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v){
|
||||
layout.setVisibility(View.GONE);
|
||||
layout.removeAllViews();
|
||||
activity.onTutorialViewHidden();
|
||||
public void onClick(View v) {
|
||||
breakPoints.remove(0);
|
||||
if (!breakPoints.isEmpty()) {
|
||||
currentView.setVisibility(View.GONE);
|
||||
showFirstBreakPoint();
|
||||
} else {
|
||||
layout.setVisibility(View.GONE);
|
||||
currentView.setVisibility(View.GONE);
|
||||
activity.onTutorialViewHidden();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/customButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</Button>
|
@ -12,7 +12,7 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="10dp"
|
||||
android:src="@drawable/guis_pausebutton" />
|
||||
android:src="@drawable/guis_pausebutton"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/game_toolbuttonbar"
|
||||
@ -21,7 +21,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="3dp" />
|
||||
android:layout_marginTop="3dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_playerprogress"
|
||||
@ -30,19 +30,18 @@
|
||||
android:layout_margin="4dp"
|
||||
android:text="0.0m"
|
||||
android:textColor="#ffb405"
|
||||
android:textSize="22sp" />
|
||||
android:textSize="22sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_playerspeed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/game_playerprogress"
|
||||
android:layout_alignStart="@+id/game_playerprogress"
|
||||
android:layout_below="@+id/game_playerprogress"
|
||||
android:text="0.0m/s"
|
||||
android:textColor="#ffb405"
|
||||
android:textSize="22sp"
|
||||
android:layout_below="@+id/game_playerprogress"
|
||||
android:layout_alignLeft="@+id/game_playerprogress"
|
||||
android:layout_alignStart="@+id/game_playerprogress" />
|
||||
/>
|
||||
android:textSize="22sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_fps"
|
||||
@ -53,7 +52,7 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="Fps: 00"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="15sp"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/game_shortmenu"
|
||||
@ -74,16 +73,15 @@
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_countdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3"
|
||||
android:id="@+id/game_countdown"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textSize="100sp"
|
||||
android:visibility="invisible"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="3"
|
||||
android:textColor="@color/countdown3"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
android:textSize="100sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
</RelativeLayout>
|
@ -2,7 +2,7 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/xml_levelbutton_background"
|
||||
android:background="@drawable/xml_background_levelbutton"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<TextView
|
||||
@ -12,7 +12,7 @@
|
||||
android:text="Button"
|
||||
android:textColor="#000000"
|
||||
android:textSize="30sp"
|
||||
android:layout_centerHorizontal="true" />
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
@ -26,28 +26,28 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/currency_star_empty"
|
||||
android:id="@+id/levelbutton_star1"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/currency_star_empty"
|
||||
android:id="@+id/levelbutton_star2"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/currency_star_empty"
|
||||
android:id="@+id/levelbutton_star3"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/currency_energy_empty"
|
||||
android:id="@+id/levelbutton_energy"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -58,6 +58,6 @@
|
||||
android:src="@drawable/lock_locked"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="invisible"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</RelativeLayout>
|
@ -28,13 +28,13 @@
|
||||
android:id="@+id/levels_topRow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/levels_bottomRow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</TableLayout>
|
||||
</HorizontalScrollView>
|
||||
|
@ -31,7 +31,7 @@
|
||||
android:text="Level Up"
|
||||
android:textColor="#ffe100"
|
||||
android:textSize="50sp"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="400dp"
|
||||
@ -39,7 +39,7 @@
|
||||
android:id="@+id/imageView"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/splitter"
|
||||
android:layout_marginTop="10dp" />
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/levelup_unlocklist"
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent" android:layout_height="match_parent">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -9,36 +10,36 @@
|
||||
android:id="@+id/message_title"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textSize="55sp" />
|
||||
android:textSize="55sp"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Restart"
|
||||
android:id="@+id/message_leftbutton"
|
||||
style="@style/customButton"
|
||||
style="@style/GameButton"
|
||||
android:layout_marginTop="37dp"
|
||||
android:layout_below="@+id/message_title"
|
||||
android:layout_alignStart="@+id/message_title" />
|
||||
android:layout_alignStart="@+id/message_title"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Exit"
|
||||
style="@style/customButton"
|
||||
style="@style/GameButton"
|
||||
android:id="@+id/message_exitbutton"
|
||||
android:layout_alignTop="@+id/message_leftbutton"
|
||||
android:layout_alignEnd="@+id/message_title" />
|
||||
android:layout_alignEnd="@+id/message_title"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Try again"
|
||||
style="@style/customButton"
|
||||
style="@style/GameButton"
|
||||
android:id="@+id/message_tryagainbutton"
|
||||
android:visibility="visible"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_below="@+id/message_leftbutton"
|
||||
android:layout_alignStart="@+id/message_leftbutton" />
|
||||
android:layout_alignStart="@+id/message_leftbutton"/>
|
||||
|
||||
</RelativeLayout>
|
@ -24,7 +24,7 @@
|
||||
android:text="Continue"
|
||||
android:textSize="40sp"
|
||||
android:textColor="@color/win"
|
||||
android:id="@+id/shortmenu_continue" />
|
||||
android:id="@+id/shortmenu_continue"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -32,7 +32,7 @@
|
||||
android:text="Restart"
|
||||
android:textSize="40sp"
|
||||
android:textColor="@color/win"
|
||||
android:id="@+id/shortmenu_restart" />
|
||||
android:id="@+id/shortmenu_restart"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -40,6 +40,6 @@
|
||||
android:text="Exit"
|
||||
android:textSize="40sp"
|
||||
android:textColor="@color/win"
|
||||
android:id="@+id/shortmenu_exit" />
|
||||
android:id="@+id/shortmenu_exit"/>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
@ -11,9 +11,9 @@
|
||||
android:layout_marginTop="26dp"
|
||||
android:layout_toEndOf="@+id/startscreen_play"
|
||||
android:layout_toRightOf="@+id/startscreen_play"
|
||||
android:background="@drawable/xml_sound_toggle"
|
||||
android:background="@drawable/xml_selector_sound"
|
||||
android:textOff=""
|
||||
android:textOn="" />
|
||||
android:textOn=""/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_play"
|
||||
@ -24,21 +24,21 @@
|
||||
android:text="Play"
|
||||
android:textSize="25sp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_comingsoon"
|
||||
style="@style/customButton"
|
||||
style="@style/GameButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Level Up"
|
||||
android:layout_alignTop="@+id/startscreen_play"
|
||||
android:layout_toRightOf="@+id/startscreen_sound"
|
||||
android:layout_toEndOf="@+id/startscreen_sound" />
|
||||
android:layout_toEndOf="@+id/startscreen_sound"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/startscreen_maxcheat"
|
||||
style="@style/customButton"
|
||||
style="@style/GameButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Lv to 100"
|
||||
@ -46,6 +46,6 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginLeft="48dp"
|
||||
android:layout_marginStart="48dp" />
|
||||
android:layout_marginStart="48dp"/>
|
||||
|
||||
</RelativeLayout>
|
@ -11,12 +11,12 @@
|
||||
android:text="Ramp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="#000000"
|
||||
android:textSize="25sp" />
|
||||
android:textSize="25sp"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/toolofferslot_slot"
|
||||
layout="@layout/tool_slot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
</LinearLayout>
|
@ -8,7 +8,7 @@
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/xml_tool_slot_background"
|
||||
android:src="@drawable/rampbutton" />
|
||||
android:background="@drawable/xml_background_toolslot"
|
||||
android:src="@drawable/rampbutton"/>
|
||||
|
||||
</FrameLayout>
|
@ -8,14 +8,14 @@
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/rampbutton" />
|
||||
android:src="@drawable/rampbutton"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/toolProgressButtonAnimation"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="60dp"
|
||||
android:src="@drawable/rampbutton"
|
||||
android:visibility="invisible" />
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/toolProgressBar"
|
||||
@ -25,7 +25,6 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:max="100"
|
||||
android:progress="100"
|
||||
android:progressDrawable="@drawable/xml_toolprogressbarlayers" />
|
||||
|
||||
android:progressDrawable="@drawable/xml_layers_toolprogressbar"/>
|
||||
|
||||
</RelativeLayout>
|
@ -8,7 +8,7 @@
|
||||
android:id="@+id/toolshop_topbar"
|
||||
layout="@layout/topbar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
@ -23,7 +23,7 @@
|
||||
layout="@layout/tool_slot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp" />
|
||||
android:layout_marginRight="5dp"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/toolshop_slot2"
|
||||
@ -31,7 +31,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp" />
|
||||
android:layout_marginRight="5dp"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/toolshop_slot3"
|
||||
@ -39,14 +39,14 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp" />
|
||||
android:layout_marginRight="5dp"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/toolshop_slot4"
|
||||
layout="@layout/tool_slot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp" />
|
||||
android:layout_marginLeft="5dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="9"
|
||||
style="@style/customButton"
|
||||
style="@style/GameButton"
|
||||
android:drawableLeft="@drawable/star_icon"
|
||||
android:id="@+id/toolshop_price_button"
|
||||
android:visibility="invisible"/>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/topbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -24,14 +23,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Level: 1"
|
||||
android:textColor="#000000"
|
||||
android:textSize="25sp" />
|
||||
android:textSize="25sp"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/topbar_levelprogress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:progress="50" />
|
||||
android:progress="50"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -41,7 +40,7 @@
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/topbar_levellayout"
|
||||
android:background="@drawable/currency_star" />
|
||||
android:background="@drawable/currency_star"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
@ -52,17 +51,17 @@
|
||||
android:layout_toEndOf="@+id/topbar_starcount"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:id="@+id/topbar_energyview" />
|
||||
android:id="@+id/topbar_energyview"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/topbar_starcount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/topbar_starview"
|
||||
android:text="100"
|
||||
android:textColor="#000000"
|
||||
android:textSize="25sp" />
|
||||
android:id="@+id/topbar_starcount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/topbar_starview"
|
||||
android:text="100"
|
||||
android:textColor="#000000"
|
||||
android:textSize="25sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/topbar_energycount"
|
||||
@ -72,7 +71,7 @@
|
||||
android:layout_toEndOf="@+id/topbar_energyview"
|
||||
android:text="100"
|
||||
android:textColor="#000000"
|
||||
android:textSize="25sp" />
|
||||
android:textSize="25sp"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/topbar_soundtoggle"
|
||||
@ -82,19 +81,19 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_toStartOf="@+id/topbar_toolshop"
|
||||
android:background="@drawable/xml_sound_toggle"
|
||||
android:background="@drawable/xml_selector_sound"
|
||||
android:textOff=""
|
||||
android:textOn="" />
|
||||
android:textOn=""/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/topbar_toolshop"
|
||||
style="@style/customButton"
|
||||
style="@style/GameButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="5dp"
|
||||
android:text="Tool-Shop" />
|
||||
android:text="Tool-Shop"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/topbar_starcount_decrease"
|
||||
@ -105,11 +104,11 @@
|
||||
android:textColor="#000000"
|
||||
android:textSize="20sp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignEnd="@+id/topbar_starcount" />
|
||||
android:layout_alignEnd="@+id/topbar_starcount"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/topbar_resetButton"
|
||||
style="@style/customButton"
|
||||
style="@style/GameButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Reset"
|
||||
@ -118,7 +117,6 @@
|
||||
android:layout_alignBaseline="@+id/topbar_soundtoggle"
|
||||
android:layout_alignBottom="@+id/topbar_soundtoggle"
|
||||
android:layout_toRightOf="@+id/topbar_energycount"
|
||||
android:layout_toEndOf="@+id/topbar_energycount" />
|
||||
|
||||
android:layout_toEndOf="@+id/topbar_energycount"/>
|
||||
|
||||
</RelativeLayout>
|
100
app/src/main/res/layout/tutorial.xml
Normal file
100
app/src/main/res/layout/tutorial.xml
Normal file
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/backgrounds_menu_shortmenu">
|
||||
|
||||
<include
|
||||
layout="@layout/game"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/tutorial_welcome"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
style="@style/TutorialTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginEnd="56dp"
|
||||
android:layout_marginRight="56dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:text="Welcome to Endless Roll!\nThis is a test tutorial screen!\nHave fun!"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/tutorial_tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
style="@style/TutorialTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/imageView3"
|
||||
android:layout_alignStart="@+id/imageView3"
|
||||
android:layout_alignTop="@+id/imageView3"
|
||||
android:layout_marginLeft="46dp"
|
||||
android:layout_marginStart="46dp"
|
||||
android:layout_marginTop="36dp"
|
||||
android:text="Here you can see your tools"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="170dp"
|
||||
android:layout_marginStart="170dp"
|
||||
android:layout_marginTop="79dp"
|
||||
android:background="@drawable/guis_playerarrow"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/tutorial_place_ramp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
style="@style/TutorialTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginEnd="104dp"
|
||||
android:layout_marginRight="104dp"
|
||||
android:layout_marginTop="105dp"
|
||||
android:text="Now place your ramp in front of the gap!"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/tutorial_place_ramp_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
style="@style/TutorialTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginEnd="104dp"
|
||||
android:layout_marginRight="104dp"
|
||||
android:layout_marginTop="105dp"
|
||||
android:text="Now place it in front of the obstacle!"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/backgrounds_menu_shortmenu">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/xml_tutorial_speechbubble_background"
|
||||
android:textColor="#000000"
|
||||
android:text="Welcome to Endless Roll!\nThis is a test tutorial screen!\nHave fun!"
|
||||
android:layout_marginRight="52dp"
|
||||
android:layout_marginEnd="52dp"
|
||||
android:layout_marginTop="39dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
</RelativeLayout>
|
@ -1,15 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal" android:layout_width="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/xml_unlock_message_background">
|
||||
android:background="@drawable/xml_background_bountymessage">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:id="@+id/unlockmessage_toolimage"
|
||||
android:src="@drawable/rampbutton"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -19,5 +20,5 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20sp" />
|
||||
android:textSize="20sp"/>
|
||||
</LinearLayout>
|
@ -2,7 +2,7 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/xml_worldbutton_background">
|
||||
android:background="@drawable/xml_background_worldbutton">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/worldbutton_title"
|
||||
@ -13,7 +13,7 @@
|
||||
android:text="Unknown"
|
||||
android:textColor="#ff2200"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold|italic" />
|
||||
android:textStyle="bold|italic"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/worldbutton_preview"
|
||||
@ -23,7 +23,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/previews_grass"
|
||||
android:layout_width="150dp" />
|
||||
android:layout_width="150dp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
@ -44,7 +44,7 @@
|
||||
android:layout_width="30sp"
|
||||
android:layout_height="30sp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:src="@drawable/tick" />
|
||||
android:src="@drawable/tick"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/worldbutton_levelcount"
|
||||
@ -66,7 +66,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/worldbutton_levelcount"
|
||||
android:layout_toEndOf="@+id/worldbutton_levelcount"
|
||||
android:src="@drawable/currency_star" />
|
||||
android:src="@drawable/currency_star"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/worldbutton_starcount"
|
||||
@ -91,7 +91,7 @@
|
||||
android:text="9/35"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView4"
|
||||
@ -100,8 +100,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/worldbutton_starcount"
|
||||
android:layout_toRightOf="@+id/worldbutton_starcount"
|
||||
android:src="@drawable/currency_energy" />
|
||||
|
||||
android:src="@drawable/currency_energy"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
@ -114,6 +113,6 @@
|
||||
android:visibility="visible"
|
||||
android:layout_alignBottom="@+id/worldbutton_preview"
|
||||
android:layout_alignLeft="@+id/worldbutton_preview"
|
||||
android:layout_alignStart="@+id/worldbutton_preview" />
|
||||
android:layout_alignStart="@+id/worldbutton_preview"/>
|
||||
|
||||
</RelativeLayout>
|
@ -9,7 +9,7 @@
|
||||
layout="@layout/topbar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true" />
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -8,8 +8,8 @@
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="customButton">
|
||||
<item name="android:background">@drawable/xml_custom_button</item>
|
||||
<style name="GameButton">
|
||||
<item name="android:background">@drawable/xml_selector_gamebutton</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:shadowColor">#646363</item>
|
||||
@ -18,4 +18,10 @@
|
||||
<item name="android:shadowRadius">2</item>
|
||||
</style>
|
||||
|
||||
<style name="TutorialTextView">
|
||||
<item name="android:background">@drawable/xml_background_tutorialtextview</item>
|
||||
<item name="android:textColor">#000000</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user