fix to escape button
added difficulty panel for arcade
This commit is contained in:
parent
d7deb5d8c4
commit
b39e39ec6c
18 changed files with 2525 additions and 96 deletions
|
@ -6,7 +6,7 @@ public class ButtonConnectArcade : ButtonOnClick {
|
|||
|
||||
public override void OnClick() {
|
||||
if (GameTransition.Instance.state == GameState.Menu) {
|
||||
GameBoardInstance.instance.SetupGame();
|
||||
GameTransition.Instance.state = GameState.SinglePlayer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
14
Assets/RealCode/Menu/ButtonS/ButtonDifficulty.cs
Normal file
14
Assets/RealCode/Menu/ButtonS/ButtonDifficulty.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ButtonDifficulty : ButtonOnClick {
|
||||
|
||||
public int difficulty;
|
||||
|
||||
public override void OnClick() {
|
||||
GameBoardInstance.instance.AIDifficulty = difficulty;
|
||||
GameBoardInstance.instance.SetupGame();
|
||||
}
|
||||
|
||||
}
|
11
Assets/RealCode/Menu/ButtonS/ButtonDifficulty.cs.meta
Normal file
11
Assets/RealCode/Menu/ButtonS/ButtonDifficulty.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5c325503000e74244a6a62fc85f2997f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/RealCode/Menu/ButtonS/ButtonMainMenuSpecialCase.cs
Normal file
11
Assets/RealCode/Menu/ButtonS/ButtonMainMenuSpecialCase.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ButtonMainMenuSpecialCase : ButtonOnClick {
|
||||
|
||||
public override void OnClick() {
|
||||
GameTransition.Instance.Escape();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 52ce7b02de768614b8ccfd584d6e1998
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load diff
|
@ -94,7 +94,6 @@ public class GameTransition : MonoBehaviour {
|
|||
}
|
||||
|
||||
private void Start() {
|
||||
escapeButton.GetComponent<Button>().onClick.AddListener(Escape);
|
||||
baseEscapePosition = escapeButton.anchoredPosition;
|
||||
|
||||
baseCamera = Camera.main;
|
||||
|
@ -191,12 +190,13 @@ public class GameTransition : MonoBehaviour {
|
|||
return state != GameState.Menu;
|
||||
}
|
||||
|
||||
void Escape(){
|
||||
public void Escape(){
|
||||
if (!ShowEscapeButton()) return;
|
||||
|
||||
switch (state){
|
||||
case GameState.Help:
|
||||
case GameState.Credits:
|
||||
case GameState.SinglePlayer:
|
||||
state = GameState.Menu;
|
||||
break;
|
||||
// must disconnect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue