Skip to content

Commit

Permalink
Merge pull request #133 from nathalmg/master
Browse files Browse the repository at this point in the history
Updated GameSettings and fixed tests
  • Loading branch information
GNAR1ZARD authored Apr 24, 2024
2 parents 4c58d3a + a361731 commit 6f7c6fc
Show file tree
Hide file tree
Showing 67 changed files with 10,651 additions and 9,367 deletions.
461 changes: 461 additions & 0 deletions Crypto Wars/Assets/InitTestScene638494886230474870.unity

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Crypto Wars/Assets/InitTestScene638494886230474870.unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 37 additions & 13 deletions Crypto Wars/Assets/Scenes/GameSettings.unity
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ RectTransform:
- {fileID: 1853319218}
- {fileID: 2093687544}
- {fileID: 620531436}
- {fileID: 1224117506}
- {fileID: 724148189}
m_Father: {fileID: 150460279}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -418,7 +419,6 @@ RectTransform:
- {fileID: 494674735}
- {fileID: 903953149}
- {fileID: 1166935057}
- {fileID: 1224117506}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
Expand Down Expand Up @@ -1514,7 +1514,7 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 0}
- m_Target: {fileID: 1166935056}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
Expand Down Expand Up @@ -1801,7 +1801,7 @@ GameObject:
- component: {fileID: 724148191}
- component: {fileID: 724148190}
m_Layer: 5
m_Name: RetMainMenu
m_Name: ConfirmSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand All @@ -1822,9 +1822,9 @@ RectTransform:
- {fileID: 1348711279}
m_Father: {fileID: 68754812}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -300}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 659.9999, y: -496.9845}
m_SizeDelta: {x: 500, y: 75}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &724148190
Expand Down Expand Up @@ -2363,6 +2363,18 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 68754811}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 1
m_CallState: 2
--- !u!114 &853015713
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3057,7 +3069,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Button
m_text: Return to Main Menu
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
Expand Down Expand Up @@ -3147,7 +3159,7 @@ GameObject:
- component: {fileID: 1224117508}
- component: {fileID: 1224117507}
m_Layer: 5
m_Name: Button
m_Name: RetMainMenu
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand All @@ -3166,11 +3178,11 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1213104307}
m_Father: {fileID: 150460279}
m_Father: {fileID: 68754812}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -700, y: -800}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -660.00006, y: -496.9845}
m_SizeDelta: {x: 500, y: 75}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1224117507
Expand Down Expand Up @@ -3596,7 +3608,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Return to Main Menu
m_text: Start
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
Expand Down Expand Up @@ -5233,6 +5245,18 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 68754811}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 1
m_CallState: 2
--- !u!114 &1925360425
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
5 changes: 3 additions & 2 deletions Crypto Wars/Assets/Scripts/GUI/SettingsMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,19 @@ public void setFourPlayer()


// Multiplayer Settings
// moved functionality of SetActive to the Inspector due to test failures
public void hotSeatEnable()
{
hotseat = true;
Debug.Log("Hotseat Enabled");
settingsMenu.SetActive(true);
//settingsMenu.SetActive(true);
}

public void hotseatDisable()
{
hotseat = false;
Debug.Log("Hotseat Disabled");
settingsMenu.SetActive(true);
//settingsMenu.SetActive(true);
}


Expand Down
14 changes: 14 additions & 0 deletions Crypto Wars/Assets/Scripts/Test_PlayMode/SettingsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@

public class SettingsTest
{
public GameObject go;
public SettingsMenu settTest;

[SetUp]
public void SetUp()
{
go = new GameObject();
go.AddComponent<SettingsMenu>();
settTest = go.GetComponent<SettingsMenu>();
}

[Test]
public void TestPlayerCountSettings()
{
Expand Down Expand Up @@ -53,5 +62,10 @@ public void TestTilePercentageSettings()
Assert.AreEqual(settTest.getTileWinCondition(), 1f);
}

[TearDown]
public void TearDown()
{
Object.DestroyImmediate(go);
}

}
Binary file added Crypto Wars/CodeCoverage/.DS_Store
Binary file not shown.
Loading

0 comments on commit 6f7c6fc

Please sign in to comment.