Adjust GameVariables
This commit is contained in:
@@ -4,6 +4,10 @@ using UnityEngine;
|
||||
namespace ScriptableObjects {
|
||||
[CreateAssetMenu(fileName = "GameVariables", menuName = "Game Variables")]
|
||||
public class GameVariables : ScriptableObject {
|
||||
[Header("Debug")]
|
||||
[Tooltip("Turns Gem switching on/off")]
|
||||
public bool debugMode;
|
||||
|
||||
[Header("Prefabs")]
|
||||
public GameObject bgTilePrefabs;
|
||||
public GemTypeValues[] gemsPrefabs;
|
||||
|
||||
@@ -215,6 +215,9 @@ namespace Services {
|
||||
/// </param>
|
||||
/// <returns></returns>
|
||||
public void TrySwitch(Vector2Int position) {
|
||||
if (!this.gameVariables.debugMode)
|
||||
return;
|
||||
|
||||
Gem gem = this.gameBoard.GetGemAt(position);
|
||||
if(gem == null)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user