11using System ;
2- using JetBrains . Annotations ;
2+ using UnityEngine ;
33
44namespace Code . Infrastructure . Services . PersistenceProgress . Player
55{
66 [ Serializable ]
77 public class PlayerData
88 {
9+ public string PlayerName = "TestPlayer" ;
10+ public int Level = 5 ;
11+ public float Health = 82.3f ;
12+ public bool HasPremium = true ;
13+ public DateTime LastLoginTime = DateTime . Now ;
14+ public Vector3 Position = new Vector3 ( 2.5f , 0 , - 4.3f ) ;
915
10- [ UsedImplicitly ]
11- public PlayerData ( )
16+ public GameSettings Settings = new GameSettings ( ) ;
17+ public InventoryData Inventory = new InventoryData ( ) ;
18+ public QuestProgress [ ] Quests = new [ ]
1219 {
13-
14- }
20+ new QuestProgress { QuestId = "quest_001" , IsCompleted = true , Progress = 1.0f } ,
21+ new QuestProgress { QuestId = "quest_002" , IsCompleted = false , Progress = 0.4f }
22+ } ;
23+ }
24+
25+ [ Serializable ]
26+ public class GameSettings
27+ {
28+ public float MusicVolume = 0.8f ;
29+ public float SfxVolume = 0.5f ;
30+ public bool IsVibrationEnabled = true ;
31+ public ResolutionSettings Resolution = new ResolutionSettings ( ) ;
32+ }
33+
34+ [ Serializable ]
35+ public class ResolutionSettings
36+ {
37+ public int Width = 1920 ;
38+ public int Height = 1080 ;
39+ public bool Fullscreen = true ;
40+ }
41+
42+ [ Serializable ]
43+ public class InventoryData
44+ {
45+ public int Coins = 999 ;
46+ public int Gems = 30 ;
47+ public InventoryItem [ ] Items = new [ ]
48+ {
49+ new InventoryItem { Id = "sword_01" , Count = 1 } ,
50+ new InventoryItem { Id = "shield_02" , Count = 1 } ,
51+ new InventoryItem { Id = "potion_hp" , Count = 5 }
52+ } ;
53+ }
54+
55+ [ Serializable ]
56+ public class InventoryItem
57+ {
58+ public string Id ;
59+ public int Count ;
60+ }
61+
62+ [ Serializable ]
63+ public class QuestProgress
64+ {
65+ public string QuestId ;
66+ public bool IsCompleted ;
67+ public float Progress ;
1568 }
1669}
0 commit comments