Skip to content

Commit 10c371f

Browse files
committed
Move files (UserProgress)
1 parent fea107d commit 10c371f

13 files changed

+200
-167
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Collections.Generic;
3+
4+
namespace RimuruDev.PersistentModule.Models
5+
{
6+
[Serializable]
7+
public class HalloweenEventProgress
8+
{
9+
public int Currency;
10+
public List<LevelProgress> LevelProgresses;
11+
12+
public override string ToString() =>
13+
$"Currency: {Currency} | LevelProgresses: {LevelProgresses}";
14+
}
15+
}

CrossPlatformPersistentProgress/Assets/PersistentModule/Models/HalloweenEventProgress.cs.meta

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.Collections.Generic;
3+
4+
namespace RimuruDev.PersistentModule.Models
5+
{
6+
public class HalloweenEventProgressProxy
7+
{
8+
public event Action<int> OnCurrencyChanged;
9+
10+
public HalloweenEventProgress Origin { get; private set; }
11+
12+
public HalloweenEventProgressProxy(HalloweenEventProgress origin)
13+
{
14+
this.Origin = origin;
15+
}
16+
17+
public int Currency
18+
{
19+
get => Origin.Currency;
20+
set
21+
{
22+
Origin.Currency = value;
23+
OnCurrencyChanged?.Invoke(Origin.Currency);
24+
}
25+
}
26+
27+
public List<LevelProgress> LevelProgresses
28+
{
29+
get => Origin.LevelProgresses;
30+
set => Origin.LevelProgresses = value;
31+
}
32+
33+
public sealed override string ToString() =>
34+
Origin.ToString();
35+
}
36+
}

CrossPlatformPersistentProgress/Assets/PersistentModule/Models/HalloweenEventProgressProxy.cs.meta

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
3+
namespace RimuruDev.PersistentModule.Models
4+
{
5+
[Serializable]
6+
public class LevelProgress
7+
{
8+
public int Id;
9+
public bool Completed;
10+
11+
public override string ToString() =>
12+
$"Id: {Id} | Completed: {Completed}";
13+
}
14+
}

CrossPlatformPersistentProgress/Assets/PersistentModule/Models/LevelProgress.cs.meta

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
3+
namespace RimuruDev.PersistentModule.Models
4+
{
5+
[Serializable]
6+
public class SkinProgress
7+
{
8+
public string SkinId;
9+
public string SkinName;
10+
public bool IsSelected;
11+
public bool IsPurchasable;
12+
13+
public override string ToString() =>
14+
$"SkinId: {SkinId} | SkinName: {SkinName} | IsSelected: {IsSelected} | IsPurchasable: {IsPurchasable}";
15+
}
16+
}

CrossPlatformPersistentProgress/Assets/PersistentModule/Models/SkinProgress.cs.meta

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
namespace RimuruDev.PersistentModule.Models
2+
{
3+
public class SkinProgressProxy
4+
{
5+
public SkinProgress Origin { get; private set; }
6+
7+
public SkinProgressProxy(SkinProgress origin)
8+
{
9+
Origin = origin;
10+
}
11+
12+
public string SkinId
13+
{
14+
get => Origin.SkinId;
15+
set => Origin.SkinId = value;
16+
}
17+
18+
public string SkinName
19+
{
20+
get => Origin.SkinName;
21+
set => Origin.SkinName = value;
22+
}
23+
24+
public bool IsSelected
25+
{
26+
get => Origin.IsSelected;
27+
set => Origin.IsSelected = value;
28+
}
29+
30+
public bool IsPurchasable
31+
{
32+
get => Origin.IsPurchasable;
33+
set => Origin.IsPurchasable = value;
34+
}
35+
36+
public sealed override string ToString() =>
37+
Origin.ToString();
38+
}
39+
}

CrossPlatformPersistentProgress/Assets/PersistentModule/Models/SkinProgressProxy.cs.meta

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
using System;
2-
using System.Collections.Generic;
32

43
namespace RimuruDev.PersistentModule.Models
54
{
6-
#region Models
7-
85
[Serializable]
96
public class UserProgress
107
{
@@ -16,168 +13,4 @@ public class UserProgress
1613
public override string ToString() =>
1714
$"UserId: {UserId} | UserName: {UserName} | Coins: {Coins} | Crystals: {Crystals}";
1815
}
19-
20-
[Serializable]
21-
public class SkinProgress
22-
{
23-
public string SkinId;
24-
public string SkinName;
25-
public bool IsSelected;
26-
public bool IsPurchasable;
27-
28-
public override string ToString() =>
29-
$"SkinId: {SkinId} | SkinName: {SkinName} | IsSelected: {IsSelected} | IsPurchasable: {IsPurchasable}";
30-
}
31-
32-
[Serializable]
33-
public class LevelProgress
34-
{
35-
public int Id;
36-
public bool Completed;
37-
38-
public override string ToString() =>
39-
$"Id: {Id} | Completed: {Completed}";
40-
}
41-
42-
#endregion
43-
44-
#region Proxy
45-
46-
[Serializable]
47-
public class HalloweenEventProgress
48-
{
49-
public int Currency;
50-
public List<LevelProgress> LevelProgresses;
51-
52-
public override string ToString() =>
53-
$"Currency: {Currency} | LevelProgresses: {LevelProgresses}";
54-
}
55-
56-
public class UserProgressProxy
57-
{
58-
public event Action<int> OnCoinsChanged;
59-
public event Action<int> OnCrystalsChanged;
60-
public event Action<string> OnUserNameChanged;
61-
public event Action<string> OnUserIdChanged;
62-
63-
public UserProgress Origin { get; }
64-
65-
public UserProgressProxy(UserProgress origin)
66-
{
67-
Origin = origin;
68-
}
69-
70-
public string UserId
71-
{
72-
get => Origin.UserId;
73-
set
74-
{
75-
Origin.UserId = value;
76-
OnUserIdChanged?.Invoke(value);
77-
}
78-
}
79-
80-
public string UserName
81-
{
82-
get => Origin.UserName;
83-
set
84-
{
85-
Origin.UserName = value;
86-
OnUserNameChanged?.Invoke(value);
87-
}
88-
}
89-
90-
public int Coins
91-
{
92-
get => Origin.Coins;
93-
set
94-
{
95-
Origin.Coins = value;
96-
OnCoinsChanged?.Invoke(Origin.Coins);
97-
}
98-
}
99-
100-
public int Crystals
101-
{
102-
get => Origin.Crystals;
103-
set
104-
{
105-
Origin.Crystals = value;
106-
OnCrystalsChanged?.Invoke(Origin.Crystals);
107-
}
108-
}
109-
110-
public sealed override string ToString() =>
111-
Origin.ToString();
112-
}
113-
114-
public class SkinProgressProxy
115-
{
116-
public SkinProgress Origin { get; private set; }
117-
118-
public SkinProgressProxy(SkinProgress origin)
119-
{
120-
Origin = origin;
121-
}
122-
123-
public string SkinId
124-
{
125-
get => Origin.SkinId;
126-
set => Origin.SkinId = value;
127-
}
128-
129-
public string SkinName
130-
{
131-
get => Origin.SkinName;
132-
set => Origin.SkinName = value;
133-
}
134-
135-
public bool IsSelected
136-
{
137-
get => Origin.IsSelected;
138-
set => Origin.IsSelected = value;
139-
}
140-
141-
public bool IsPurchasable
142-
{
143-
get => Origin.IsPurchasable;
144-
set => Origin.IsPurchasable = value;
145-
}
146-
147-
public sealed override string ToString() =>
148-
Origin.ToString();
149-
}
150-
151-
public class HalloweenEventProgressProxy
152-
{
153-
public event Action<int> OnCurrencyChanged;
154-
155-
public HalloweenEventProgress Origin { get; private set; }
156-
157-
public HalloweenEventProgressProxy(HalloweenEventProgress origin)
158-
{
159-
this.Origin = origin;
160-
}
161-
162-
public int Currency
163-
{
164-
get => Origin.Currency;
165-
set
166-
{
167-
Origin.Currency = value;
168-
OnCurrencyChanged?.Invoke(Origin.Currency);
169-
}
170-
}
171-
172-
public List<LevelProgress> LevelProgresses
173-
{
174-
get => Origin.LevelProgresses;
175-
set => Origin.LevelProgresses = value;
176-
}
177-
178-
public sealed override string ToString() =>
179-
Origin.ToString();
180-
}
181-
182-
#endregion
18316
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
using System;
2+
3+
namespace RimuruDev.PersistentModule.Models
4+
{
5+
public class UserProgressProxy
6+
{
7+
public event Action<int> OnCoinsChanged;
8+
public event Action<int> OnCrystalsChanged;
9+
public event Action<string> OnUserNameChanged;
10+
public event Action<string> OnUserIdChanged;
11+
12+
public UserProgress Origin { get; }
13+
14+
public UserProgressProxy(UserProgress origin)
15+
{
16+
Origin = origin;
17+
}
18+
19+
public string UserId
20+
{
21+
get => Origin.UserId;
22+
set
23+
{
24+
Origin.UserId = value;
25+
OnUserIdChanged?.Invoke(value);
26+
}
27+
}
28+
29+
public string UserName
30+
{
31+
get => Origin.UserName;
32+
set
33+
{
34+
Origin.UserName = value;
35+
OnUserNameChanged?.Invoke(value);
36+
}
37+
}
38+
39+
public int Coins
40+
{
41+
get => Origin.Coins;
42+
set
43+
{
44+
Origin.Coins = value;
45+
OnCoinsChanged?.Invoke(Origin.Coins);
46+
}
47+
}
48+
49+
public int Crystals
50+
{
51+
get => Origin.Crystals;
52+
set
53+
{
54+
Origin.Crystals = value;
55+
OnCrystalsChanged?.Invoke(Origin.Crystals);
56+
}
57+
}
58+
59+
public sealed override string ToString() =>
60+
Origin.ToString();
61+
}
62+
}

0 commit comments

Comments
 (0)