Commit 254d1a68 authored by Yousef Sameh's avatar Yousef Sameh

guest pop up + 60 fps

parent 4de72e48
......@@ -38,7 +38,7 @@ public class AppRouter : MonoBehaviour
_instance = this;
DontDestroyOnLoad(gameObject);
// Standard mobile optimizations
QualitySettings.vSyncCount = 0;
Application.targetFrameRate = 60;
Screen.orientation = ScreenOrientation.Portrait;
}
......
......@@ -35,6 +35,9 @@ public class HomeController : MonoBehaviour
void Start()
{
QualitySettings.vSyncCount = 0;
Application.targetFrameRate = 60;
var root = mainMenuDocument.rootVisualElement.Q("Home");
menuPanel = mainMenuDocument.rootVisualElement.Q("MenuPanel");
......@@ -53,6 +56,8 @@ public class HomeController : MonoBehaviour
SetPlayButtonsEnabled(false);
OnUserChange(UserService.Instance.CurrentUser);
}
private void OnUserChange(User user)
......
......@@ -8,7 +8,7 @@
<ui:VisualElement name="PlayerDetails" style="flex-grow: 0; align-items: center; justify-content: space-around; margin-bottom: 0;">
<ui:VisualElement name="ProfileImage" style="flex-grow: 0; height: 300px; width: 200px; background-image: none; -unity-background-scale-mode: scale-to-fit; margin-left: 0; background-color: rgba(0, 0, 0, 0.5); margin-top: 0; margin-right: 0; margin-bottom: 15px; flex-shrink: 0; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-top-left-radius: 50%; border-top-right-radius: 50%; border-bottom-right-radius: 50%; border-bottom-left-radius: 50%; aspect-ratio: 1;">
<ui:VisualElement name="ProfileImage" style="flex-grow: 1; height: auto; width: initial; background-image: url(&quot;project://database/Assets/Art/download_52.jpg?fileID=2800000&amp;guid=e2f7d877c1a40ed4fb2c1e9eff097928&amp;type=3#download_52&quot;); -unity-background-scale-mode: scale-to-fit; margin-left: 0; background-color: rgb(254, 215, 0); border-top-left-radius: 50%; border-top-right-radius: 50%; border-bottom-right-radius: 50%; border-bottom-left-radius: 50%; margin-top: 0; margin-right: 0; margin-bottom: 0; flex-shrink: 0; border-left-color: rgba(255, 255, 255, 0.5); border-right-color: rgba(255, 255, 255, 0.5); border-top-color: rgba(255, 255, 255, 0.5); border-bottom-color: rgba(255, 255, 255, 0.5); border-top-width: 5px; border-right-width: 5px; border-bottom-width: 5px; border-left-width: 5px; translate: 0% -10px;">
<ui:Button text="" name="OpenProfileImagePanel" class="edit-photo" style="width: 80px; height: 80px; display: flex;">
<ui:Button text="" name="OpenProfileImagePanel" class="edit-photo" style="width: 80px; height: 80px; display: none;">
<ui:Label text="📷" class="emoji" style="font-size: 37px; translate: 0% -4px;"/>
</ui:Button>
<Bindings>
......
......@@ -469,7 +469,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &373486799
Transform:
m_ObjectHideFlags: 0
......@@ -786,6 +786,51 @@ Camera:
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!1 &1126406841
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1126406843}
- component: {fileID: 1126406842}
m_Layer: 0
m_Name: Message
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1126406842
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1126406841}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 42d332574029f664b90d64379d0bea9b, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::ShowUIMessage
UIDocument: {fileID: 1455761156}
--- !u!4 &1126406843
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1126406841}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 614.55945, y: 1228.1313, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1154832526
GameObject:
m_ObjectHideFlags: 0
......@@ -1236,3 +1281,4 @@ SceneRoots:
m_Roots:
- {fileID: 2035341440}
- {fileID: 1450206974}
- {fileID: 1126406843}
......@@ -11,6 +11,9 @@ public class LoginPageAnimation : MonoBehaviour
Button guestModeButton;
void Start()
{
QualitySettings.vSyncCount = 0;
Application.targetFrameRate = 60;
PlayerPrefs.SetInt("IsGuest", 0);
if (Application.internetReachability == NetworkReachability.NotReachable)
......
......@@ -17,7 +17,7 @@ public class ChallengeManager : MonoBehaviour
[SerializeField] private TransitionSettings transitionSettings;
[SerializeField] private int winningPoints = 100;
[SerializeField] private int timeSavedBonusMultiplier = 2;
[SerializeField] private float timeSavedBonusMultiplier = 2;
[SerializeField] private List<int> penaltiesPerGame = new() { 200, 150, 100 };
......@@ -106,8 +106,8 @@ public class ChallengeManager : MonoBehaviour
currentGameIndex++;
if (currentGameIndex >= gameSceneNames.Count)
{
var pointsEarnedTotal = winningPoints + (timeSaved * timeSavedBonusMultiplier);
WonChallenge(timeSaved, pointsEarnedTotal).Forget();
var pointsEarnedTotal = winningPoints + ((float)timeSaved * timeSavedBonusMultiplier);
WonChallenge(timeSaved, Convert.ToInt32(pointsEarnedTotal)).Forget();
return;
}
......
......@@ -605,10 +605,9 @@ MonoBehaviour:
- tf
- mcq
transitionSettings: {fileID: 11400000, guid: 057babd6f13132c449650d99e3c4e99c, type: 2}
winningPoints: 500
timeSavedBonusMultiplier: 2
winningPoints: 75
timeSavedBonusMultiplier: 5
penaltiesPerGame: c80000009600000064000000
transitionSFX: {fileID: 8300000, guid: 5fbe46aa3e590164480422e3c655116b, type: 3}
challengeCanvas: {fileID: 3214242843135042761}
--- !u!1 &6825994381865325274
GameObject:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment