Loading app/src/main/AndroidManifest.xml +13 −10 Original line number Diff line number Diff line Loading @@ -11,6 +11,12 @@ android:supportsRtl="true" android:theme="@style/Theme.Game2D" tools:targetApi="31"> <activity android:name=".ChalkIntroActivity" android:exported="false" /> <activity android:name=".NameIntroActivity" android:exported="false" /> <activity android:name=".SplashActivity" android:exported="true" Loading @@ -25,16 +31,15 @@ <activity android:name=".StartActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:screenOrientation="sensorLandscape" android:exported="true"> </activity> android:exported="true" android:screenOrientation="sensorLandscape" /> <activity android:name=".CharacterActivity" android:screenOrientation="landscape" /> <activity android:name=".ChalkGameActivity" android:screenOrientation="landscape" android:exported="false" /> android:exported="false" android:screenOrientation="landscape" /> <activity android:name=".ChalkActivity" android:exported="false" Loading @@ -52,12 +57,10 @@ <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".PauseWindow" android:exported="false" android:screenOrientation="landscape"> </activity> android:screenOrientation="landscape" /> <activity android:name=".NameActivity" android:exported="true" Loading app/src/main/java/com/example/game2d/ChalkIntroActivity.java 0 → 100644 +28 −0 Original line number Diff line number Diff line package com.example.game2d; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class ChalkIntroActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chalk_intro); Button answerButton = findViewById(R.id.answerQuestion); answerButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(ChalkIntroActivity.this, ChalkActivity.class); //intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent); } }); } } No newline at end of file app/src/main/java/com/example/game2d/Game.java +2 −2 Original line number Diff line number Diff line Loading @@ -187,13 +187,13 @@ public class Game extends SurfaceView implements SurfaceHolder.Callback { // method to start name activity public void startSecondActivity() { Intent intent = new Intent(gameContext, NameActivity.class); Intent intent = new Intent(gameContext, NameIntroActivity.class); gameContext.startActivity(intent); Log.d("COLLISION", "Starting name activity"); } // method to start chalk activity public void startChalkActivity() { Intent intent = new Intent(gameContext, ChalkActivity.class); Intent intent = new Intent(gameContext, ChalkIntroActivity.class); gameContext.startActivity(intent); Log.d("COLLISION", "Starting chalk activity"); } Loading app/src/main/java/com/example/game2d/NameIntroActivity.java 0 → 100644 +29 −0 Original line number Diff line number Diff line package com.example.game2d; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class NameIntroActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_name_intro); Button readButton = findViewById(R.id.openNameList); readButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(NameIntroActivity.this, NameActivity.class); //intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent); } }); } } No newline at end of file app/src/main/res/layout/activity_chalk_intro.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ android:layout_marginBottom="60dp" android:text="Answer Question" android:fontFamily="@font/press_start_2p" android:id="@+id/answerQ" android:id="@+id/answerQuestion" /> Loading Loading
app/src/main/AndroidManifest.xml +13 −10 Original line number Diff line number Diff line Loading @@ -11,6 +11,12 @@ android:supportsRtl="true" android:theme="@style/Theme.Game2D" tools:targetApi="31"> <activity android:name=".ChalkIntroActivity" android:exported="false" /> <activity android:name=".NameIntroActivity" android:exported="false" /> <activity android:name=".SplashActivity" android:exported="true" Loading @@ -25,16 +31,15 @@ <activity android:name=".StartActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:screenOrientation="sensorLandscape" android:exported="true"> </activity> android:exported="true" android:screenOrientation="sensorLandscape" /> <activity android:name=".CharacterActivity" android:screenOrientation="landscape" /> <activity android:name=".ChalkGameActivity" android:screenOrientation="landscape" android:exported="false" /> android:exported="false" android:screenOrientation="landscape" /> <activity android:name=".ChalkActivity" android:exported="false" Loading @@ -52,12 +57,10 @@ <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".PauseWindow" android:exported="false" android:screenOrientation="landscape"> </activity> android:screenOrientation="landscape" /> <activity android:name=".NameActivity" android:exported="true" Loading
app/src/main/java/com/example/game2d/ChalkIntroActivity.java 0 → 100644 +28 −0 Original line number Diff line number Diff line package com.example.game2d; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class ChalkIntroActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chalk_intro); Button answerButton = findViewById(R.id.answerQuestion); answerButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(ChalkIntroActivity.this, ChalkActivity.class); //intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent); } }); } } No newline at end of file
app/src/main/java/com/example/game2d/Game.java +2 −2 Original line number Diff line number Diff line Loading @@ -187,13 +187,13 @@ public class Game extends SurfaceView implements SurfaceHolder.Callback { // method to start name activity public void startSecondActivity() { Intent intent = new Intent(gameContext, NameActivity.class); Intent intent = new Intent(gameContext, NameIntroActivity.class); gameContext.startActivity(intent); Log.d("COLLISION", "Starting name activity"); } // method to start chalk activity public void startChalkActivity() { Intent intent = new Intent(gameContext, ChalkActivity.class); Intent intent = new Intent(gameContext, ChalkIntroActivity.class); gameContext.startActivity(intent); Log.d("COLLISION", "Starting chalk activity"); } Loading
app/src/main/java/com/example/game2d/NameIntroActivity.java 0 → 100644 +29 −0 Original line number Diff line number Diff line package com.example.game2d; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class NameIntroActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_name_intro); Button readButton = findViewById(R.id.openNameList); readButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(NameIntroActivity.this, NameActivity.class); //intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent); } }); } } No newline at end of file
app/src/main/res/layout/activity_chalk_intro.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ android:layout_marginBottom="60dp" android:text="Answer Question" android:fontFamily="@font/press_start_2p" android:id="@+id/answerQ" android:id="@+id/answerQuestion" /> Loading