Commit 217ef66d authored by Yousef Sameh's avatar Yousef Sameh

Scene and Points management

parent f2f1f730
...@@ -3,7 +3,7 @@ using Supabase.Postgrest.Attributes; ...@@ -3,7 +3,7 @@ using Supabase.Postgrest.Attributes;
using Supabase.Postgrest.Models; using Supabase.Postgrest.Models;
[Table("game_history")] [Table("game_history")]
public class GameHistory : BaseModel public class GameHistoryModel : BaseModel
{ {
[PrimaryKey("id")] [PrimaryKey("id")]
public string Id { get; set; } public string Id { get; set; }
......
...@@ -23,7 +23,7 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -23,7 +23,7 @@ public class GameHistoryService : Singleton<GameHistoryService>
if (authUser == null) if (authUser == null)
return new ErrorResult("Not authenticated"); return new ErrorResult("Not authenticated");
var game = new GameHistory var game = new GameHistoryModel
{ {
GameType = gameType, GameType = gameType,
PointsEarned = points, PointsEarned = points,
...@@ -32,7 +32,7 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -32,7 +32,7 @@ public class GameHistoryService : Singleton<GameHistoryService>
CreatedAt = DateTime.UtcNow CreatedAt = DateTime.UtcNow
}; };
await supabase.From<GameHistory>().Insert(game); await supabase.From<GameHistoryModel>().Insert(game);
Debug.Log($"✓ Game added: {gameType} - {points} pts"); Debug.Log($"✓ Game added: {gameType} - {points} pts");
return new GameResult(game); return new GameResult(game);
} }
...@@ -49,7 +49,7 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -49,7 +49,7 @@ public class GameHistoryService : Singleton<GameHistoryService>
try try
{ {
var response = await supabase var response = await supabase
.From<GameHistory>() .From<GameHistoryModel>()
.Where(x => x.Id == gameId) .Where(x => x.Id == gameId)
.Get(); .Get();
...@@ -76,7 +76,7 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -76,7 +76,7 @@ public class GameHistoryService : Singleton<GameHistoryService>
var userId = authUser.Id.ToString(); var userId = authUser.Id.ToString();
var response = await supabase var response = await supabase
.From<GameHistory>() .From<GameHistoryModel>()
.Where(x => x.UserId == userId) .Where(x => x.UserId == userId)
.Order(x => x.TimeStarted, Ordering.Descending) .Order(x => x.TimeStarted, Ordering.Descending)
.Limit(limit) .Limit(limit)
...@@ -104,7 +104,7 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -104,7 +104,7 @@ public class GameHistoryService : Singleton<GameHistoryService>
var userId = authUser.Id.ToString(); var userId = authUser.Id.ToString();
var response = await supabase var response = await supabase
.From<GameHistory>() .From<GameHistoryModel>()
.Where(x => x.UserId == userId && x.GameType == gameType) .Where(x => x.UserId == userId && x.GameType == gameType)
.Order(x => x.TimeStarted, Ordering.Descending) .Order(x => x.TimeStarted, Ordering.Descending)
.Limit(limit) .Limit(limit)
...@@ -130,7 +130,7 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -130,7 +130,7 @@ public class GameHistoryService : Singleton<GameHistoryService>
var userId = authUser.Id.ToString(); var userId = authUser.Id.ToString();
var response = await supabase var response = await supabase
.From<GameHistory>() .From<GameHistoryModel>()
.Where(x => x.UserId == userId) .Where(x => x.UserId == userId)
.Get(); .Get();
...@@ -160,7 +160,7 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -160,7 +160,7 @@ public class GameHistoryService : Singleton<GameHistoryService>
var userId = authUser.Id.ToString(); var userId = authUser.Id.ToString();
var response = await supabase var response = await supabase
.From<GameHistory>() .From<GameHistoryModel>()
.Where(x => x.UserId == userId && x.GameType == gameType) .Where(x => x.UserId == userId && x.GameType == gameType)
.Get(); .Get();
...@@ -201,7 +201,7 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -201,7 +201,7 @@ public class GameHistoryService : Singleton<GameHistoryService>
return new ErrorResult("Not authenticated"); return new ErrorResult("Not authenticated");
await supabase await supabase
.From<GameHistory>() .From<GameHistoryModel>()
.Where(x => x.Id == gameId && x.UserId == authUser.Id.ToString()) .Where(x => x.Id == gameId && x.UserId == authUser.Id.ToString())
.Delete(); .Delete();
...@@ -215,8 +215,8 @@ public class GameHistoryService : Singleton<GameHistoryService> ...@@ -215,8 +215,8 @@ public class GameHistoryService : Singleton<GameHistoryService>
} }
// Result types // Result types
public record GameResult(GameHistory Game); public record GameResult(GameHistoryModel Game);
public record GameHistoryListResult(List<GameHistory> Games); public record GameHistoryListResult(List<GameHistoryModel> Games);
public record TotalPointsResult(int TotalPoints); public record TotalPointsResult(int TotalPoints);
public record GameStatsResult( public record GameStatsResult(
string GameType, string GameType,
......
using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks;
using OneOf; using OneOf;
using Supabase; using Supabase;
using Supabase.Realtime;
using Supabase.Realtime.PostgresChanges;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -8,19 +10,25 @@ using UnityEngine; ...@@ -8,19 +10,25 @@ using UnityEngine;
public class UserService : Singleton<UserService> public class UserService : Singleton<UserService>
{ {
private Client supabase => SupabaseManager.Instance.Supabase(); private Supabase.Client supabase => SupabaseManager.Instance.Supabase();
public User? CurrentUser { private set; get; } public User? CurrentUser { private set; get; }
public Action<User> OnUserChange; public Action<User> OnUserChange;
private RealtimeChannel _userChannel;
public async UniTask LoadCurrentUser() public async UniTask LoadCurrentUser()
{ {
var userOrFail = await GetCurrentUser(); var userOrFail = await GetCurrentUser();
userOrFail.Switch((user) => userOrFail.Switch(async (user) =>
{ {
CurrentUser = user.User; CurrentUser = user.User;
OnUserChange?.Invoke(CurrentUser); OnUserChange?.Invoke(CurrentUser);
}, (error) => Debug.LogError(error.Message)); await SubscribeToCurrentUserChanges(CurrentUser.Id);
}, (error) =>
{
Debug.LogError(error.Message);
});
} }
protected async override void Awake() protected async override void Awake()
...@@ -58,15 +66,21 @@ public class UserService : Singleton<UserService> ...@@ -58,15 +66,21 @@ public class UserService : Singleton<UserService>
try try
{ {
if (supabase == null) if (supabase == null)
{ return new ErrorResult("Supabase is null");
Debug.LogError("Supabase is null");
}
var authUser = supabase.Auth.CurrentUser; var authUser = supabase.Auth.CurrentUser;
if (authUser == null)
return new ErrorResult("Not authenticated");
var user = await supabase
.From<User>()
.Where(x => x.Id == authUser.Id)
.Single();
var parameters = new Dictionary<string, object> { { "target_user_id", authUser.Id } }; if (user == null)
var userProf = await supabase.Rpc<List<User>>("get_user_profile", parameters); return new ErrorResult("User not found");
return new UserResult(userProf.First()); return new UserResult(user);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -78,13 +92,15 @@ public class UserService : Singleton<UserService> ...@@ -78,13 +92,15 @@ public class UserService : Singleton<UserService>
{ {
try try
{ {
var parameters = new Dictionary<string, object> { { "target_user_id", userId } }; var user = await supabase
var userProf = await supabase.Rpc<List<User>>("get_user_profile", parameters); .From<User>()
.Where(x => x.Id == userId)
.Single();
if (userProf == null) if (user == null)
return new ErrorResult("User not found"); return new ErrorResult("User not found");
return new UserResult(userProf.First()); return new UserResult(user);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -92,6 +108,46 @@ public class UserService : Singleton<UserService> ...@@ -92,6 +108,46 @@ public class UserService : Singleton<UserService>
} }
} }
private async UniTask SubscribeToCurrentUserChanges(string userId)
{
if (string.IsNullOrWhiteSpace(userId))
return;
if (_userChannel != null)
{
_userChannel.Unsubscribe();
_userChannel = null;
}
await supabase.Realtime.ConnectAsync();
_userChannel = supabase.Realtime.Channel($"user_{userId}");
_userChannel.Register(new PostgresChangesOptions(schema: "public", table: "users", eventType: PostgresChangesOptions.ListenType.Updates, filter: $"id=eq.{userId}"));
_userChannel.AddPostgresChangeHandler(
PostgresChangesOptions.ListenType.Updates,
(_, change) =>
{
var updatedUser = change.Model<User>();
if (updatedUser == null)
return;
CurrentUser = updatedUser;
OnUserChange?.Invoke(CurrentUser);
});
await _userChannel.Subscribe();
}
private async void OnDestroy()
{
if (_userChannel != null)
{
_userChannel.Unsubscribe();
_userChannel = null;
}
}
public async UniTask<OneOf<UserResult, ErrorResult>> UpdateDisplayName(string newDisplayName) public async UniTask<OneOf<UserResult, ErrorResult>> UpdateDisplayName(string newDisplayName)
{ {
try try
......
...@@ -2,6 +2,7 @@ using System.Linq; ...@@ -2,6 +2,7 @@ using System.Linq;
using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks;
using LightSide; using LightSide;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
public class HomeUI : MonoBehaviour public class HomeUI : MonoBehaviour
{ {
...@@ -53,7 +54,12 @@ public class HomeUI : MonoBehaviour ...@@ -53,7 +54,12 @@ public class HomeUI : MonoBehaviour
private void OnUserChange(User user) private void OnUserChange(User user)
{ {
greetingText.Text = $"Hello, {user.DisplayName}"; greetingText.Text = $"Hello, {user.DisplayName}";
rankText.Text = $"Your rank is {user.Rank}"; rankText.Text = $"Your rank is {user.Points}";
}
public void LoadMinigameScene(string sceneName)
{
SceneManager.LoadScene(sceneName);
} }
......
...@@ -1008,6 +1008,143 @@ MonoBehaviour: ...@@ -1008,6 +1008,143 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a29f84e4eefe327808a91f9df8828283, type: 3} m_Script: {fileID: 11500000, guid: a29f84e4eefe327808a91f9df8828283, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::ActivityService m_EditorClassIdentifier: Assembly-CSharp::ActivityService
--- !u!1 &413820079
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 413820080}
- component: {fileID: 413820082}
- component: {fileID: 413820081}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &413820080
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 413820079}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1169537712}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &413820081
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 413820079}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: CS
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &413820082
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 413820079}
m_CullTransparentMesh: 1
--- !u!1 &429400588 --- !u!1 &429400588
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -3186,6 +3323,139 @@ MonoBehaviour: ...@@ -3186,6 +3323,139 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RectMask2D m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RectMask2D
m_Padding: {x: -8, y: -5, z: -8, w: -5} m_Padding: {x: -8, y: -5, z: -8, w: -5}
m_Softness: {x: 0, y: 0} m_Softness: {x: 0, y: 0}
--- !u!1 &1169537711
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1169537712}
- component: {fileID: 1169537715}
- component: {fileID: 1169537714}
- component: {fileID: 1169537713}
m_Layer: 5
m_Name: CS
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1169537712
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1169537711}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 413820080}
m_Father: {fileID: 1925923778}
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: -1.2, y: -85.9}
m_SizeDelta: {x: 232.8676, y: 43.6627}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1169537713
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1169537711}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1169537714}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1615490131}
m_TargetAssemblyTypeName: HomeUI, Assembly-CSharp
m_MethodName: LoadMinigameScene
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: cs
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1169537714
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1169537711}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1169537715
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1169537711}
m_CullTransparentMesh: 1
--- !u!1 &1174813286 --- !u!1 &1174813286
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -6063,6 +6333,7 @@ RectTransform: ...@@ -6063,6 +6333,7 @@ RectTransform:
- {fileID: 1694109609} - {fileID: 1694109609}
- {fileID: 145504515} - {fileID: 145504515}
- {fileID: 1458110290} - {fileID: 1458110290}
- {fileID: 1169537712}
m_Father: {fileID: 1615490127} m_Father: {fileID: 1615490127}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
......
...@@ -10,6 +10,7 @@ namespace com.al_arcade.cs ...@@ -10,6 +10,7 @@ namespace com.al_arcade.cs
using System.Linq; using System.Linq;
using shared; using shared;
using Unity.Cinemachine; using Unity.Cinemachine;
using UnityEngine.SceneManagement;
public enum CsGameState public enum CsGameState
{ {
...@@ -74,6 +75,8 @@ namespace com.al_arcade.cs ...@@ -74,6 +75,8 @@ namespace com.al_arcade.cs
private float _timeLeft; private float _timeLeft;
private bool isTicking; private bool isTicking;
private DateTime gameStartTime;
// if it reaches 5, you win the game; // if it reaches 5, you win the game;
int _deltaChangeInSize; int _deltaChangeInSize;
bool showHint = true; bool showHint = true;
...@@ -246,6 +249,7 @@ namespace com.al_arcade.cs ...@@ -246,6 +249,7 @@ namespace com.al_arcade.cs
yield return uiManager.ShowCountDown(); yield return uiManager.ShowCountDown();
gameStartTime = DateTime.Now;
BeginGameplay(); BeginGameplay();
} }
...@@ -434,55 +438,6 @@ namespace com.al_arcade.cs ...@@ -434,55 +438,6 @@ namespace com.al_arcade.cs
_groupFraming.CenterOffset = new Vector2(0f, -0.1f); _groupFraming.CenterOffset = new Vector2(0f, -0.1f);
// int wordCount = question.words.Length;
// float padding = 0.1f;
// float charWidth = 0.32f;
// float[] wordWidths = new float[wordCount];
// float totalWidth = 0;
// for (int i = 0; i < wordCount; i++)
// {
// float w = question.words[i].word_text.Length * charWidth + padding;
// w = Mathf.Max(w, 1.0f);
// wordWidths[i] = w;
// totalWidth += w;
// }
// float maxAllowedWidth = 14f;
// float scaleFactor = 1f;
// if (totalWidth > maxAllowedWidth)
// {
// scaleFactor = maxAllowedWidth / totalWidth;
// for (int i = 0; i < wordCount; i++)
// wordWidths[i] *= scaleFactor;
// }
// // Arc centre = camera position
// Camera cam = Camera.main;
// Vector3 arcCenter =
// cam != null ? cam.transform.position + Vector3.up * 0.5f : Vector3.zero;
// // Total arc-length consumed by words + gaps between them
// float totalArcLength = 0f;
// for (int i = 0; i < wordCount; i++)
// totalArcLength += wordWidths[i];
// totalArcLength += (wordCount - 1) * wordGap;
// // Convert arc-length to angle: arcLength = radius * angleInRadians
// float totalAngleRad = totalArcLength / arcRadius;
// float totalAngleDeg = totalAngleRad * Mathf.Rad2Deg;
// // Clamp to the configured arc span
// float usedSpanDeg = Mathf.Min(totalAngleDeg, arcSpanDegrees);
// float spanScale = usedSpanDeg / totalAngleDeg;
// // Start from the right edge, centered on 90° (straight ahead in XZ)
// float startAngleDeg = 90f - usedSpanDeg * 0.5f;
// // Running arc-length cursor (from the start edge)
// float cursorArcLength = 0f;
// Spawn Full Sentence // Spawn Full Sentence
var sentenceObj = new GameObject("FullQuestion"); var sentenceObj = new GameObject("FullQuestion");
sentenceObj.transform.SetParent(wordContainer); sentenceObj.transform.SetParent(wordContainer);
...@@ -491,41 +446,6 @@ namespace com.al_arcade.cs ...@@ -491,41 +446,6 @@ namespace com.al_arcade.cs
sentenceWb.Initialize(question); sentenceWb.Initialize(question);
return; return;
// for (int i = 0; i < wordCount; i++) {
// // Center of this word along the arc
// float wordCenterArc = cursorArcLength + wordWidths[i] * 0.5f;
// // Scale arc-length to fit within the allowed span
// float arcFraction = totalArcLength > 0 ? wordCenterArc / totalArcLength : 0.5f;
// float angleDeg = startAngleDeg + arcFraction * usedSpanDeg;
// float angleRad = angleDeg * Mathf.Deg2Rad;
// Vector3 pos =
// arcCenter
// + new Vector3(
// Mathf.Cos(angleRad) * arcRadius,
// 0f,
// Mathf.Sin(angleRad) * arcRadius
// );
// var word = question.words[i];
// var wordObj = new GameObject($"Word_{i}_{word.word_text}");
// if (wordContainer != null)
// wordObj.transform.SetParent(wordContainer);
// wordObj.transform.position = pos;
// var wb = wordObj.AddComponent<CsWordButton>();
// wb.Setup(word.word_text, word.is_wrong, i, wordWidths[i], scaleFactor);
// _wordButtons.Add(wb);
// wordObj.transform.localScale = Vector3.zero;
// wordObj
// .transform.DOScale(Vector3.one, 0.4f)
// .SetDelay(i * 0.08f)
// .SetEase(Ease.OutBack);
// cursorArcLength += wordWidths[i] + wordGap;
// }
} }
private void ShowOptions() private void ShowOptions()
...@@ -598,6 +518,11 @@ namespace com.al_arcade.cs ...@@ -598,6 +518,11 @@ namespace com.al_arcade.cs
onGameComplete?.Invoke(_score); onGameComplete?.Invoke(_score);
SSAudioManager.Instance.StopMusic(); SSAudioManager.Instance.StopMusic();
ClearWordButtons(); ClearWordButtons();
GameHistoryService.Instance.AddGame("cs", _score, gameStartTime, DateTime.Now);
yield return new WaitForSeconds(5f);
SceneManager.LoadScene("App");
} }
private IEnumerator DelayedAction(float delay, Action action) private IEnumerator DelayedAction(float delay, Action action)
......
...@@ -5,6 +5,7 @@ using UnityEngine.Events; ...@@ -5,6 +5,7 @@ using UnityEngine.Events;
using DG.Tweening; using DG.Tweening;
using com.al_arcade.shared; using com.al_arcade.shared;
using com.al_arcade.mcq; using com.al_arcade.mcq;
using System;
namespace com.al_arcade.mcq namespace com.al_arcade.mcq
{ {
public class NewMCQGameManger : MonoBehaviour public class NewMCQGameManger : MonoBehaviour
...@@ -25,6 +26,7 @@ namespace com.al_arcade.mcq ...@@ -25,6 +26,7 @@ namespace com.al_arcade.mcq
[SerializeField] private AudioClip sfxCheer; [SerializeField] private AudioClip sfxCheer;
[SerializeField] private AudioClip sfxCountdown; [SerializeField] private AudioClip sfxCountdown;
private DateTime gameStartTime;
private McqQuestion[] _questions; private McqQuestion[] _questions;
private McqQuestion currentQuestion; private McqQuestion currentQuestion;
...@@ -72,6 +74,7 @@ namespace com.al_arcade.mcq ...@@ -72,6 +74,7 @@ namespace com.al_arcade.mcq
} }
NewMCQUIManager.Instance.HideLoading(); NewMCQUIManager.Instance.HideLoading();
gameStartTime = DateTime.Now;
ShowNextQuestion(); ShowNextQuestion();
} }
...@@ -138,7 +141,7 @@ namespace com.al_arcade.mcq ...@@ -138,7 +141,7 @@ namespace com.al_arcade.mcq
} }
} }
Invoke(nameof(GoToNextQuestion),1f); Invoke(nameof(GoToNextQuestion), 1f);
} }
private void GoToNextQuestion() private void GoToNextQuestion()
...@@ -160,6 +163,8 @@ namespace com.al_arcade.mcq ...@@ -160,6 +163,8 @@ namespace com.al_arcade.mcq
NewMCQUIManager.Instance.ShowResults(_score, _correctCount, _wrongCount, NewMCQUIManager.Instance.ShowResults(_score, _correctCount, _wrongCount,
_bestStreak, _questions.Length, true); _bestStreak, _questions.Length, true);
GameHistoryService.Instance.AddGame("mcq", _score, gameStartTime, DateTime.Now);
} }
private IEnumerator GameOverSequence() private IEnumerator GameOverSequence()
......
...@@ -6,6 +6,7 @@ using DG.Tweening; ...@@ -6,6 +6,7 @@ using DG.Tweening;
namespace com.al_arcade.tf namespace com.al_arcade.tf
{ {
using Microsoft.IdentityModel.Tokens;
using shared; using shared;
public enum TfGameState public enum TfGameState
...@@ -34,6 +35,8 @@ namespace com.al_arcade.tf ...@@ -34,6 +35,8 @@ namespace com.al_arcade.tf
private bool _waitingForAnswer; private bool _waitingForAnswer;
private int _pendingAnswer = -1; private int _pendingAnswer = -1;
private DateTime gameStartTime;
[Header("Events")] [Header("Events")]
public UnityEvent onGameStart; public UnityEvent onGameStart;
public UnityEvent<bool> onAnswerGiven; public UnityEvent<bool> onAnswerGiven;
...@@ -119,6 +122,8 @@ namespace com.al_arcade.tf ...@@ -119,6 +122,8 @@ namespace com.al_arcade.tf
} }
if (uiManager != null) uiManager.HideLoading(); if (uiManager != null) uiManager.HideLoading();
gameStartTime = DateTime.Now;
BeginGameplay(); BeginGameplay();
} }
...@@ -281,7 +286,7 @@ namespace com.al_arcade.tf ...@@ -281,7 +286,7 @@ namespace com.al_arcade.tf
{ if (audio.sfxVictory != null) audio.PlayVictory(); else audio.PlaySuccessJingle(); } { if (audio.sfxVictory != null) audio.PlayVictory(); else audio.PlaySuccessJingle(); }
var particles = SSParticleManager.Instance; var particles = SSParticleManager.Instance;
if (particles != null) particles.PlayConfetti(new Vector3(-2 , 6f , 13)); if (particles != null) particles.PlayConfetti(new Vector3(-2, 6f, 13));
if (productionLine != null) yield return productionLine.ProductComplete(); if (productionLine != null) yield return productionLine.ProductComplete();
productionLine.machineVFXController.StopAllVFX(); productionLine.machineVFXController.StopAllVFX();
...@@ -289,6 +294,9 @@ namespace com.al_arcade.tf ...@@ -289,6 +294,9 @@ namespace com.al_arcade.tf
if (uiManager != null) if (uiManager != null)
uiManager.ShowResults(_score, _correctCount, _wrongCount, true); uiManager.ShowResults(_score, _correctCount, _wrongCount, true);
GameHistoryService.Instance.AddGame("tf", _score, gameStartTime, DateTime.Now);
} }
public int Progress => _progress; public int Progress => _progress;
......
...@@ -5,9 +5,18 @@ EditorBuildSettings: ...@@ -5,9 +5,18 @@ EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: m_Scenes:
- enabled: 1
path: Assets/Scenes/App.unity
guid: 11cbccdcd0073e6b9b696ebb57616ab2
- enabled: 1 - enabled: 1
path: Assets/Scenes/TF/TF.unity path: Assets/Scenes/TF/TF.unity
guid: c2f60049cef0f6b44b9445afcf550aff guid: c2f60049cef0f6b44b9445afcf550aff
- enabled: 1
path: Assets/Scenes/MCQ/MCQ.unity
guid: dc77d4f7977b6514e96035771e5e547f
- enabled: 1
path: Assets/Scenes/CS/CS.unity
guid: 4013c5c8b28e4e746859513f1ec95b1e
m_configObjects: m_configObjects:
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3} com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
m_UseUCBPForAssetBundles: 0 m_UseUCBPForAssetBundles: 0
...@@ -18,22 +18,22 @@ EditorUserSettings: ...@@ -18,22 +18,22 @@ EditorUserSettings:
value: 54035150530d5d580f580e7b16220f4415154e737b2b75367a711f6be0b66c61 value: 54035150530d5d580f580e7b16220f4415154e737b2b75367a711f6be0b66c61
flags: 0 flags: 0
RecentlyUsedSceneGuid-3: RecentlyUsedSceneGuid-3:
value: 5701055506000a030f5c542744260844404f4d73797975367c2c1e6ab7e2653d value: 5b01035204015f035c580d7242765c14464f4e7f7a2a70687c7e4432b5e2633b
flags: 0 flags: 0
RecentlyUsedSceneGuid-4: RecentlyUsedSceneGuid-4:
value: 5b01035204015f035c580d7242765c14464f4e7f7a2a70687c7e4432b5e2633b value: 5304575f5c0c51035d5a5e771271594417154e7c2d7b70647b7b4c35bbe1646d
flags: 0 flags: 0
RecentlyUsedSceneGuid-5: RecentlyUsedSceneGuid-5:
value: 5304575f5c0c51035d5a5e771271594417154e7c2d7b70647b7b4c35bbe1646d value: 0003525055055d020e0b0a7216755d444215417e787d27362e2f4866b2e1323e
flags: 0 flags: 0
RecentlyUsedSceneGuid-6: RecentlyUsedSceneGuid-6:
value: 0003525055055d020e0b0a7216755d444215417e787d27362e2f4866b2e1323e value: 5701055506000a030f5c542744260844404f4d73797975367c2c1e6ab7e2653d
flags: 0 flags: 0
RecentlyUsedSceneGuid-7: RecentlyUsedSceneGuid-7:
value: 0752035101010f0c54595b2046760e44134e4e7a7f7d71677c2c4836b7b4633e value: 0152005506515f5d0e5f5a7b46770d1317154c7d7d7f7734747a196ae0b26668
flags: 0 flags: 0
RecentlyUsedSceneGuid-8: RecentlyUsedSceneGuid-8:
value: 0152005506515f5d0e5f5a7b46770d1317154c7d7d7f7734747a196ae0b26668 value: 0752035101010f0c54595b2046760e44134e4e7a7f7d71677c2c4836b7b4633e
flags: 0 flags: 0
RecentlyUsedSceneGuid-9: RecentlyUsedSceneGuid-9:
value: 5200570406560d58095e5c75432609124f154e737a2d2432787e4b62b4e1366a value: 5200570406560d58095e5c75432609124f154e737a2d2432787e4b62b4e1366a
......
...@@ -24,7 +24,7 @@ MonoBehaviour: ...@@ -24,7 +24,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 112} m_MinSize: {x: 300, y: 112}
m_MaxSize: {x: 24288, y: 16192} m_MaxSize: {x: 24288, y: 16192}
vertical: 0 vertical: 0
controlID: 9799 controlID: 3699
draggingID: 0 draggingID: 0
--- !u!114 &2 --- !u!114 &2
MonoBehaviour: MonoBehaviour:
...@@ -50,7 +50,7 @@ MonoBehaviour: ...@@ -50,7 +50,7 @@ MonoBehaviour:
x: 355 x: 355
y: 61 y: 61
width: 1097 width: 1097
height: 422 height: 606
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
m_PreferredDataMode: 0 m_PreferredDataMode: 0
...@@ -70,7 +70,7 @@ MonoBehaviour: ...@@ -70,7 +70,7 @@ MonoBehaviour:
m_ShowGizmos: 0 m_ShowGizmos: 0
m_TargetDisplay: 0 m_TargetDisplay: 0
m_ClearColor: {r: 0, g: 0, b: 0, a: 0} m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
m_TargetSize: {x: 226, y: 401} m_TargetSize: {x: 1080, y: 2400}
m_TextureFilterMode: 0 m_TextureFilterMode: 0
m_TextureHideFlags: 61 m_TextureHideFlags: 61
m_RenderIMGUI: 1 m_RenderIMGUI: 1
...@@ -79,16 +79,16 @@ MonoBehaviour: ...@@ -79,16 +79,16 @@ MonoBehaviour:
m_VSyncEnabled: 0 m_VSyncEnabled: 0
m_Gizmos: 0 m_Gizmos: 0
m_Stats: 0 m_Stats: 0
m_SelectedSizes: 09000000000000000000000000000000000000000000000000000000000000000000000000000000 m_SelectedSizes: 08000000000000000000000000000000000000000000000000000000000000000000000000000000
m_ZoomArea: m_ZoomArea:
m_HRangeLocked: 0 m_HRangeLocked: 0
m_VRangeLocked: 0 m_VRangeLocked: 0
hZoomLockedByDefault: 0 hZoomLockedByDefault: 0
vZoomLockedByDefault: 0 vZoomLockedByDefault: 0
m_HBaseRangeMin: -113 m_HBaseRangeMin: -540
m_HBaseRangeMax: 113 m_HBaseRangeMax: 540
m_VBaseRangeMin: -200.5 m_VBaseRangeMin: -1200
m_VBaseRangeMax: 200.5 m_VBaseRangeMax: 1200
m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMin: 1
m_HAllowExceedBaseRangeMax: 1 m_HAllowExceedBaseRangeMax: 1
m_VAllowExceedBaseRangeMin: 1 m_VAllowExceedBaseRangeMin: 1
...@@ -107,22 +107,22 @@ MonoBehaviour: ...@@ -107,22 +107,22 @@ MonoBehaviour:
x: 0 x: 0
y: 21 y: 21
width: 1097 width: 1097
height: 401 height: 585
m_Scale: {x: 1, y: 1} m_Scale: {x: 0.24375, y: 0.24375}
m_Translation: {x: 548.5, y: 200.5} m_Translation: {x: 548.5, y: 292.5}
m_MarginLeft: 0 m_MarginLeft: 0
m_MarginRight: 0 m_MarginRight: 0
m_MarginTop: 0 m_MarginTop: 0
m_MarginBottom: 0 m_MarginBottom: 0
m_LastShownAreaInsideMargins: m_LastShownAreaInsideMargins:
serializedVersion: 2 serializedVersion: 2
x: -548.5 x: -2250.2563
y: -200.5 y: -1200
width: 1097 width: 4500.5127
height: 401 height: 2400
m_MinimalGUI: 1 m_MinimalGUI: 1
m_defaultScale: 1 m_defaultScale: 0.24375
m_LastWindowPixelSize: {x: 1097, y: 422} m_LastWindowPixelSize: {x: 1097, y: 606}
m_ClearInEditMode: 1 m_ClearInEditMode: 1
m_NoCameraWarning: 1 m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000 m_LowResolutionForAspectRatios: 01000000000000000000
...@@ -153,7 +153,7 @@ MonoBehaviour: ...@@ -153,7 +153,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 112} m_MinSize: {x: 200, y: 112}
m_MaxSize: {x: 16192, y: 16192} m_MaxSize: {x: 16192, y: 16192}
vertical: 1 vertical: 1
controlID: 9800 controlID: 3700
draggingID: 0 draggingID: 0
--- !u!114 &4 --- !u!114 &4
MonoBehaviour: MonoBehaviour:
...@@ -175,11 +175,11 @@ MonoBehaviour: ...@@ -175,11 +175,11 @@ MonoBehaviour:
x: 0 x: 0
y: 0 y: 0
width: 1454 width: 1454
height: 448 height: 632
m_MinSize: {x: 200, y: 56} m_MinSize: {x: 200, y: 56}
m_MaxSize: {x: 16192, y: 8096} m_MaxSize: {x: 16192, y: 8096}
vertical: 0 vertical: 0
controlID: 9801 controlID: 3701
draggingID: 0 draggingID: 0
--- !u!114 &5 --- !u!114 &5
MonoBehaviour: MonoBehaviour:
...@@ -199,7 +199,7 @@ MonoBehaviour: ...@@ -199,7 +199,7 @@ MonoBehaviour:
x: 0 x: 0
y: 0 y: 0
width: 355 width: 355
height: 448 height: 632
m_MinSize: {x: 201, y: 226} m_MinSize: {x: 201, y: 226}
m_MaxSize: {x: 4001, y: 4026} m_MaxSize: {x: 4001, y: 4026}
m_ActualView: {fileID: 6} m_ActualView: {fileID: 6}
...@@ -231,7 +231,7 @@ MonoBehaviour: ...@@ -231,7 +231,7 @@ MonoBehaviour:
x: 0 x: 0
y: 61 y: 61
width: 354 width: 354
height: 422 height: 606
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
m_PreferredDataMode: 0 m_PreferredDataMode: 0
...@@ -249,28 +249,27 @@ MonoBehaviour: ...@@ -249,28 +249,27 @@ MonoBehaviour:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
- m_Data: 31262 - m_Data: 70888
m_LastClickedID: m_LastClickedID:
m_Data: 0 m_Data: 70888
m_ExpandedIDs: m_ExpandedIDs:
- m_Data: -71844 - m_Data: -43612
- m_Data: -71722 - m_Data: -35028
- m_Data: -67008 - m_Data: -27586
- m_Data: -66996 - m_Data: -17086
- m_Data: -62958 - m_Data: -16000
- m_Data: -61152 - m_Data: -6542
- m_Data: -45736 - m_Data: -5310
- m_Data: -1402 - m_Data: -5188
- m_Data: -12 - m_Data: -5014
- m_Data: 78876 - m_Data: -4876
- m_Data: 78896 - m_Data: -4218
- m_Data: 78920 - m_Data: -1344
- m_Data: 78952 - m_Data: 60786
- m_Data: 78968 - m_Data: 60858
- m_Data: 79006 - m_Data: 60864
- m_Data: 79022 - m_Data: 60924
- m_Data: 79072 - m_Data: 70810
- m_Data: 80546
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
...@@ -314,7 +313,7 @@ MonoBehaviour: ...@@ -314,7 +313,7 @@ MonoBehaviour:
x: 355 x: 355
y: 0 y: 0
width: 1099 width: 1099
height: 448 height: 632
m_MinSize: {x: 202, y: 226} m_MinSize: {x: 202, y: 226}
m_MaxSize: {x: 4002, y: 4026} m_MaxSize: {x: 4002, y: 4026}
m_ActualView: {fileID: 2} m_ActualView: {fileID: 2}
...@@ -347,7 +346,7 @@ MonoBehaviour: ...@@ -347,7 +346,7 @@ MonoBehaviour:
x: 355 x: 355
y: 61 y: 61
width: 1097 width: 1097
height: 658 height: 606
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
m_PreferredDataMode: 0 m_PreferredDataMode: 0
...@@ -932,9 +931,9 @@ MonoBehaviour: ...@@ -932,9 +931,9 @@ MonoBehaviour:
m_AudioPlay: 0 m_AudioPlay: 0
m_DebugDrawModesUseInteractiveLightBakingData: 0 m_DebugDrawModesUseInteractiveLightBakingData: 0
m_Position: m_Position:
m_Target: {x: 254.03662, y: 356.294, z: 0} m_Target: {x: 616.9188, y: 1194.7426, z: -1.9342693}
speed: 2 speed: 2
m_Value: {x: 254.03662, y: 356.294, z: 0} m_Value: {x: 616.9188, y: 1194.7426, z: -1.9342693}
m_RenderMode: 0 m_RenderMode: 0
m_CameraMode: m_CameraMode:
drawMode: 0 drawMode: 0
...@@ -984,9 +983,9 @@ MonoBehaviour: ...@@ -984,9 +983,9 @@ MonoBehaviour:
speed: 2 speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1} m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size: m_Size:
m_Target: 76.6172 m_Target: 273.00452
speed: 2 speed: 2
m_Value: 76.6172 m_Value: 273.00452
m_Ortho: m_Ortho:
m_Target: 1 m_Target: 1
speed: 2 speed: 2
...@@ -1036,9 +1035,9 @@ MonoBehaviour: ...@@ -1036,9 +1035,9 @@ MonoBehaviour:
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 448 y: 632
width: 1454 width: 1454
height: 535 height: 351
m_MinSize: {x: 101, y: 126} m_MinSize: {x: 101, y: 126}
m_MaxSize: {x: 4001, y: 4026} m_MaxSize: {x: 4001, y: 4026}
m_ActualView: {fileID: 11} m_ActualView: {fileID: 11}
...@@ -1071,9 +1070,9 @@ MonoBehaviour: ...@@ -1071,9 +1070,9 @@ MonoBehaviour:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 745 y: 693
width: 1453 width: 1453
height: 273 height: 325
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
m_PreferredDataMode: 0 m_PreferredDataMode: 0
...@@ -1098,7 +1097,7 @@ MonoBehaviour: ...@@ -1098,7 +1097,7 @@ MonoBehaviour:
m_SkipHidden: 0 m_SkipHidden: 0
m_SearchArea: 1 m_SearchArea: 1
m_Folders: m_Folders:
- Assets/App/Infrastructure/Activity - Assets/Scenes
m_Globs: [] m_Globs: []
m_ProductIds: m_ProductIds:
m_AnyWithAssetOrigin: 0 m_AnyWithAssetOrigin: 0
...@@ -1108,23 +1107,21 @@ MonoBehaviour: ...@@ -1108,23 +1107,21 @@ MonoBehaviour:
m_ViewMode: 1 m_ViewMode: 1
m_StartGridSize: 96 m_StartGridSize: 96
m_LastFolders: m_LastFolders:
- Assets/App/Infrastructure/Activity - Assets/Scenes
m_LastFoldersGridSize: 96 m_LastFoldersGridSize: 96
m_LastProjectPath: /home/p0wer/development/ssbookminigames/My project m_LastProjectPath: /home/p0wer/development/ssbookminigames/My project
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_LastLocalAssetsSearchArea: 1 m_LastLocalAssetsSearchArea: 1
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 79} scrollPos: {x: 0, y: 415}
m_SelectedIDs: m_SelectedIDs:
- m_Data: 82226 - m_Data: 57350
m_LastClickedID: m_LastClickedID:
m_Data: 82226 m_Data: 57350
m_ExpandedIDs: m_ExpandedIDs:
- m_Data: 0 - m_Data: 0
- m_Data: 57336 - m_Data: 56162
- m_Data: 57740
- m_Data: 57872
- m_Data: 1000000000 - m_Data: 1000000000
- m_Data: 2147483647 - m_Data: 2147483647
m_RenameOverlay: m_RenameOverlay:
...@@ -1159,7 +1156,7 @@ MonoBehaviour: ...@@ -1159,7 +1156,7 @@ MonoBehaviour:
m_Data: 0 m_Data: 0
m_ExpandedIDs: m_ExpandedIDs:
- m_Data: 0 - m_Data: 0
- m_Data: 57336 - m_Data: 56162
- m_Data: 1000000000 - m_Data: 1000000000
- m_Data: 2147483647 - m_Data: 2147483647
m_RenameOverlay: m_RenameOverlay:
...@@ -1189,9 +1186,9 @@ MonoBehaviour: ...@@ -1189,9 +1186,9 @@ MonoBehaviour:
m_ResourceFile: m_ResourceFile:
m_ListAreaState: m_ListAreaState:
m_SelectedInstanceIDs: m_SelectedInstanceIDs:
- m_Data: 80546 - m_Data: 31262
m_LastClickedInstanceID: 80546 m_LastClickedInstanceID: 31262
m_HadKeyboardFocusLastEvent: 1 m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: m_ExpandedInstanceIDs:
- m_Data: 46526 - m_Data: 46526
- m_Data: 61214 - m_Data: 61214
...@@ -1213,7 +1210,7 @@ MonoBehaviour: ...@@ -1213,7 +1210,7 @@ MonoBehaviour:
m_OriginalEventType: 11 m_OriginalEventType: 11
m_IsRenamingFilename: 1 m_IsRenamingFilename: 1
m_TrimLeadingAndTrailingWhitespace: 0 m_TrimLeadingAndTrailingWhitespace: 0
m_ClientGUIView: {fileID: 0} m_ClientGUIView: {fileID: 9}
m_CreateAssetUtility: m_CreateAssetUtility:
m_EndAction: {fileID: 0} m_EndAction: {fileID: 0}
m_InstanceID: 0 m_InstanceID: 0
...@@ -1247,9 +1244,9 @@ MonoBehaviour: ...@@ -1247,9 +1244,9 @@ MonoBehaviour:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 509 y: 693
width: 1453 width: 1453
height: 509 height: 325
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
m_PreferredDataMode: 0 m_PreferredDataMode: 0
......
...@@ -19,7 +19,7 @@ MonoBehaviour: ...@@ -19,7 +19,7 @@ MonoBehaviour:
width: 1904 width: 1904
height: 1039 height: 1039
m_ShowMode: 4 m_ShowMode: 4
m_Title: Console m_Title: Project
m_RootView: {fileID: 2} m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 300} m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
...@@ -119,7 +119,7 @@ MonoBehaviour: ...@@ -119,7 +119,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 112} m_MinSize: {x: 300, y: 112}
m_MaxSize: {x: 24288, y: 16192} m_MaxSize: {x: 24288, y: 16192}
vertical: 0 vertical: 0
controlID: 10980 controlID: 4119
draggingID: 0 draggingID: 0
--- !u!114 &6 --- !u!114 &6
MonoBehaviour: MonoBehaviour:
...@@ -145,7 +145,7 @@ MonoBehaviour: ...@@ -145,7 +145,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 112} m_MinSize: {x: 200, y: 112}
m_MaxSize: {x: 16192, y: 16192} m_MaxSize: {x: 16192, y: 16192}
vertical: 1 vertical: 1
controlID: 10981 controlID: 4120
draggingID: 0 draggingID: 0
--- !u!114 &7 --- !u!114 &7
MonoBehaviour: MonoBehaviour:
...@@ -171,7 +171,7 @@ MonoBehaviour: ...@@ -171,7 +171,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 56} m_MinSize: {x: 200, y: 56}
m_MaxSize: {x: 16192, y: 8096} m_MaxSize: {x: 16192, y: 8096}
vertical: 0 vertical: 0
controlID: 10982 controlID: 4121
draggingID: 0 draggingID: 0
--- !u!114 &8 --- !u!114 &8
MonoBehaviour: MonoBehaviour:
...@@ -236,7 +236,7 @@ MonoBehaviour: ...@@ -236,7 +236,7 @@ MonoBehaviour:
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 1 m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: ConsoleWindow m_Name: ProjectBrowser
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Children: [] m_Children: []
m_Position: m_Position:
...@@ -245,16 +245,16 @@ MonoBehaviour: ...@@ -245,16 +245,16 @@ MonoBehaviour:
y: 632 y: 632
width: 1454 width: 1454
height: 351 height: 351
m_MinSize: {x: 101, y: 126} m_MinSize: {x: 231, y: 276}
m_MaxSize: {x: 4001, y: 4026} m_MaxSize: {x: 10001, y: 10026}
m_ActualView: {fileID: 17} m_ActualView: {fileID: 16}
m_Panes: m_Panes:
- {fileID: 16} - {fileID: 16}
- {fileID: 17} - {fileID: 17}
- {fileID: 18} - {fileID: 18}
- {fileID: 19} - {fileID: 19}
m_Selected: 1 m_Selected: 0
m_LastSelected: 0 m_LastSelected: 1
--- !u!114 &11 --- !u!114 &11
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
...@@ -539,6 +539,20 @@ MonoBehaviour: ...@@ -539,6 +539,20 @@ MonoBehaviour:
layout: 4 layout: 4
size: {x: 0, y: 0} size: {x: 0, y: 0}
sizeOverridden: 0 sizeOverridden: 0
- dockPosition: 1
containerId: overlay-toolbar__top
displayed: 0
id: Services/Environment
index: 8
contents: '{"m_Layout":4,"m_Collapsed":false,"m_Folded":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":0.0,"y":0.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":0,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}'
floating: 0
collapsed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
layout: 4
size: {x: 0, y: 0}
sizeOverridden: 0
m_ContainerData: m_ContainerData:
- containerId: overlay-toolbar__top - containerId: overlay-toolbar__top
scrollOffset: 0 scrollOffset: 0
...@@ -591,7 +605,7 @@ MonoBehaviour: ...@@ -591,7 +605,7 @@ MonoBehaviour:
m_ShowGizmos: 0 m_ShowGizmos: 0
m_TargetDisplay: 0 m_TargetDisplay: 0
m_ClearColor: {r: 0, g: 0, b: 0, a: 0} m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
m_TargetSize: {x: 329, y: 585} m_TargetSize: {x: 1080, y: 2400}
m_TextureFilterMode: 0 m_TextureFilterMode: 0
m_TextureHideFlags: 61 m_TextureHideFlags: 61
m_RenderIMGUI: 1 m_RenderIMGUI: 1
...@@ -600,16 +614,16 @@ MonoBehaviour: ...@@ -600,16 +614,16 @@ MonoBehaviour:
m_VSyncEnabled: 0 m_VSyncEnabled: 0
m_Gizmos: 0 m_Gizmos: 0
m_Stats: 0 m_Stats: 0
m_SelectedSizes: 09000000000000000000000000000000000000000000000000000000000000000000000000000000 m_SelectedSizes: 08000000000000000000000000000000000000000000000000000000000000000000000000000000
m_ZoomArea: m_ZoomArea:
m_HRangeLocked: 0 m_HRangeLocked: 0
m_VRangeLocked: 0 m_VRangeLocked: 0
hZoomLockedByDefault: 0 hZoomLockedByDefault: 0
vZoomLockedByDefault: 0 vZoomLockedByDefault: 0
m_HBaseRangeMin: -164.5 m_HBaseRangeMin: -540
m_HBaseRangeMax: 164.5 m_HBaseRangeMax: 540
m_VBaseRangeMin: -292.5 m_VBaseRangeMin: -1200
m_VBaseRangeMax: 292.5 m_VBaseRangeMax: 1200
m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMin: 1
m_HAllowExceedBaseRangeMax: 1 m_HAllowExceedBaseRangeMax: 1
m_VAllowExceedBaseRangeMin: 1 m_VAllowExceedBaseRangeMin: 1
...@@ -629,7 +643,7 @@ MonoBehaviour: ...@@ -629,7 +643,7 @@ MonoBehaviour:
y: 21 y: 21
width: 1097 width: 1097
height: 585 height: 585
m_Scale: {x: 1, y: 1} m_Scale: {x: 0.24375, y: 0.24375}
m_Translation: {x: 548.5, y: 292.5} m_Translation: {x: 548.5, y: 292.5}
m_MarginLeft: 0 m_MarginLeft: 0
m_MarginRight: 0 m_MarginRight: 0
...@@ -637,12 +651,12 @@ MonoBehaviour: ...@@ -637,12 +651,12 @@ MonoBehaviour:
m_MarginBottom: 0 m_MarginBottom: 0
m_LastShownAreaInsideMargins: m_LastShownAreaInsideMargins:
serializedVersion: 2 serializedVersion: 2
x: -548.5 x: -2250.2563
y: -292.5 y: -1200
width: 1097 width: 4500.5127
height: 585 height: 2400
m_MinimalGUI: 1 m_MinimalGUI: 1
m_defaultScale: 1 m_defaultScale: 0.24375
m_LastWindowPixelSize: {x: 1097, y: 606} m_LastWindowPixelSize: {x: 1097, y: 606}
m_ClearInEditMode: 1 m_ClearInEditMode: 1
m_NoCameraWarning: 1 m_NoCameraWarning: 1
...@@ -692,28 +706,27 @@ MonoBehaviour: ...@@ -692,28 +706,27 @@ MonoBehaviour:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
- m_Data: 31262 - m_Data: 64392
m_LastClickedID: m_LastClickedID:
m_Data: 0 m_Data: 64392
m_ExpandedIDs: m_ExpandedIDs:
- m_Data: -71844 - m_Data: -43612
- m_Data: -71722 - m_Data: -35028
- m_Data: -67008 - m_Data: -27586
- m_Data: -66996 - m_Data: -17086
- m_Data: -62958 - m_Data: -16000
- m_Data: -61152 - m_Data: -6542
- m_Data: -45736 - m_Data: -5310
- m_Data: -1402 - m_Data: -5188
- m_Data: -12 - m_Data: -5014
- m_Data: 78876 - m_Data: -4876
- m_Data: 78896 - m_Data: -4218
- m_Data: 78920 - m_Data: -1344
- m_Data: 78952 - m_Data: 60786
- m_Data: 78968 - m_Data: 60858
- m_Data: 79006 - m_Data: 60864
- m_Data: 79022 - m_Data: 60924
- m_Data: 79072 - m_Data: 70810
- m_Data: 80546
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
...@@ -763,7 +776,7 @@ MonoBehaviour: ...@@ -763,7 +776,7 @@ MonoBehaviour:
x: 355 x: 355
y: 61 y: 61
width: 1097 width: 1097
height: 658 height: 606
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
m_PreferredDataMode: 0 m_PreferredDataMode: 0
...@@ -1348,9 +1361,9 @@ MonoBehaviour: ...@@ -1348,9 +1361,9 @@ MonoBehaviour:
m_AudioPlay: 0 m_AudioPlay: 0
m_DebugDrawModesUseInteractiveLightBakingData: 0 m_DebugDrawModesUseInteractiveLightBakingData: 0
m_Position: m_Position:
m_Target: {x: 254.03662, y: 356.294, z: 0} m_Target: {x: 616.9188, y: 1194.7426, z: -1.9342693}
speed: 2 speed: 2
m_Value: {x: 254.03662, y: 356.294, z: 0} m_Value: {x: 616.9188, y: 1194.7426, z: -1.9342693}
m_RenderMode: 0 m_RenderMode: 0
m_CameraMode: m_CameraMode:
drawMode: 0 drawMode: 0
...@@ -1400,9 +1413,9 @@ MonoBehaviour: ...@@ -1400,9 +1413,9 @@ MonoBehaviour:
speed: 2 speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1} m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size: m_Size:
m_Target: 76.6172 m_Target: 273.00452
speed: 2 speed: 2
m_Value: 76.6172 m_Value: 273.00452
m_Ortho: m_Ortho:
m_Target: 1 m_Target: 1
speed: 2 speed: 2
...@@ -1458,9 +1471,9 @@ MonoBehaviour: ...@@ -1458,9 +1471,9 @@ MonoBehaviour:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 745 y: 693
width: 1453 width: 1453
height: 273 height: 325
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
m_PreferredDataMode: 0 m_PreferredDataMode: 0
...@@ -1485,7 +1498,7 @@ MonoBehaviour: ...@@ -1485,7 +1498,7 @@ MonoBehaviour:
m_SkipHidden: 0 m_SkipHidden: 0
m_SearchArea: 1 m_SearchArea: 1
m_Folders: m_Folders:
- Assets/App/Infrastructure/Activity - Assets/Scenes
m_Globs: [] m_Globs: []
m_ProductIds: m_ProductIds:
m_AnyWithAssetOrigin: 0 m_AnyWithAssetOrigin: 0
...@@ -1495,21 +1508,21 @@ MonoBehaviour: ...@@ -1495,21 +1508,21 @@ MonoBehaviour:
m_ViewMode: 1 m_ViewMode: 1
m_StartGridSize: 96 m_StartGridSize: 96
m_LastFolders: m_LastFolders:
- Assets/App/Infrastructure/Activity - Assets/Scenes
m_LastFoldersGridSize: 96 m_LastFoldersGridSize: 96
m_LastProjectPath: /home/p0wer/development/ssbookminigames/My project m_LastProjectPath: /home/p0wer/development/ssbookminigames/My project
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_LastLocalAssetsSearchArea: 1 m_LastLocalAssetsSearchArea: 1
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 79} scrollPos: {x: 0, y: 415}
m_SelectedIDs: m_SelectedIDs:
- m_Data: 82226 - m_Data: 57350
m_LastClickedID: m_LastClickedID:
m_Data: 82226 m_Data: 57350
m_ExpandedIDs: m_ExpandedIDs:
- m_Data: 0 - m_Data: 0
- m_Data: 57336 - m_Data: 56162
- m_Data: 1000000000 - m_Data: 1000000000
- m_Data: 2147483647 - m_Data: 2147483647
m_RenameOverlay: m_RenameOverlay:
...@@ -1544,7 +1557,7 @@ MonoBehaviour: ...@@ -1544,7 +1557,7 @@ MonoBehaviour:
m_Data: 0 m_Data: 0
m_ExpandedIDs: m_ExpandedIDs:
- m_Data: 0 - m_Data: 0
- m_Data: 57336 - m_Data: 56162
- m_Data: 1000000000 - m_Data: 1000000000
- m_Data: 2147483647 - m_Data: 2147483647
m_RenameOverlay: m_RenameOverlay:
...@@ -1574,9 +1587,9 @@ MonoBehaviour: ...@@ -1574,9 +1587,9 @@ MonoBehaviour:
m_ResourceFile: m_ResourceFile:
m_ListAreaState: m_ListAreaState:
m_SelectedInstanceIDs: m_SelectedInstanceIDs:
- m_Data: 80546 - m_Data: 64392
m_LastClickedInstanceID: 80546 m_LastClickedInstanceID: 64392
m_HadKeyboardFocusLastEvent: 1 m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: m_ExpandedInstanceIDs:
- m_Data: 46526 - m_Data: 46526
- m_Data: 61214 - m_Data: 61214
...@@ -1598,7 +1611,7 @@ MonoBehaviour: ...@@ -1598,7 +1611,7 @@ MonoBehaviour:
m_OriginalEventType: 11 m_OriginalEventType: 11
m_IsRenamingFilename: 1 m_IsRenamingFilename: 1
m_TrimLeadingAndTrailingWhitespace: 0 m_TrimLeadingAndTrailingWhitespace: 0
m_ClientGUIView: {fileID: 0} m_ClientGUIView: {fileID: 10}
m_CreateAssetUtility: m_CreateAssetUtility:
m_EndAction: {fileID: 0} m_EndAction: {fileID: 0}
m_InstanceID: 0 m_InstanceID: 0
......
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