Adjust GameVariables
This commit is contained in:
@@ -12,6 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 9f37e854902a46cb8bd927cf84ab450c, type: 3}
|
m_Script: {fileID: 11500000, guid: 9f37e854902a46cb8bd927cf84ab450c, type: 3}
|
||||||
m_Name: GameVariables
|
m_Name: GameVariables
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
debugMode: 0
|
||||||
bgTilePrefabs: {fileID: 2914066502361773997, guid: 3f39182b81f944a4d93213431acb41c3,
|
bgTilePrefabs: {fileID: 2914066502361773997, guid: 3f39182b81f944a4d93213431acb41c3,
|
||||||
type: 3}
|
type: 3}
|
||||||
gemsPrefabs:
|
gemsPrefabs:
|
||||||
@@ -63,7 +64,7 @@ MonoBehaviour:
|
|||||||
bombExplodeSfx: {fileID: 8300000, guid: 9dcc9b1297952c446a5571fdb2fb7a2f, type: 3}
|
bombExplodeSfx: {fileID: 8300000, guid: 9dcc9b1297952c446a5571fdb2fb7a2f, type: 3}
|
||||||
bombDelay: 2
|
bombDelay: 2
|
||||||
bombRadius: 2
|
bombRadius: 2
|
||||||
dropHeight: 3
|
dropHeight: 2
|
||||||
gemSpeed: 5
|
gemSpeed: 5
|
||||||
scoreSpeed: 3
|
scoreSpeed: 3
|
||||||
cascadeDelayMs: 150
|
cascadeDelayMs: 150
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ using UnityEngine;
|
|||||||
namespace ScriptableObjects {
|
namespace ScriptableObjects {
|
||||||
[CreateAssetMenu(fileName = "GameVariables", menuName = "Game Variables")]
|
[CreateAssetMenu(fileName = "GameVariables", menuName = "Game Variables")]
|
||||||
public class GameVariables : ScriptableObject {
|
public class GameVariables : ScriptableObject {
|
||||||
|
[Header("Debug")]
|
||||||
|
[Tooltip("Turns Gem switching on/off")]
|
||||||
|
public bool debugMode;
|
||||||
|
|
||||||
[Header("Prefabs")]
|
[Header("Prefabs")]
|
||||||
public GameObject bgTilePrefabs;
|
public GameObject bgTilePrefabs;
|
||||||
public GemTypeValues[] gemsPrefabs;
|
public GemTypeValues[] gemsPrefabs;
|
||||||
|
|||||||
@@ -215,6 +215,9 @@ namespace Services {
|
|||||||
/// </param>
|
/// </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public void TrySwitch(Vector2Int position) {
|
public void TrySwitch(Vector2Int position) {
|
||||||
|
if (!this.gameVariables.debugMode)
|
||||||
|
return;
|
||||||
|
|
||||||
Gem gem = this.gameBoard.GetGemAt(position);
|
Gem gem = this.gameBoard.GetGemAt(position);
|
||||||
if(gem == null)
|
if(gem == null)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user