Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SSBookMinigames
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
SSBookMinigames
Commits
7df88fa9
Commit
7df88fa9
authored
Apr 12, 2026
by
saad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
standardize ui for all games
parent
0652cde1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
207 additions
and
274 deletions
+207
-274
TfUI.prefab
My project/Assets/Prefabs/TF/Phone Art/TfUI.prefab
+15
-12
TfGameManager.cs
My project/Assets/ScienceStreet/TF/Scripts/TfGameManager.cs
+8
-7
TfUIManager.cs
My project/Assets/ScienceStreet/TF/Scripts/TfUIManager.cs
+184
-255
No files found.
My project/Assets/Prefabs/TF/Phone Art/TfUI.prefab
View file @
7df88fa9
...
@@ -36,7 +36,7 @@ RectTransform:
...
@@ -36,7 +36,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
22.572838
,
y
:
-25.96685
}
m_AnchoredPosition
:
{
x
:
22.572838
,
y
:
-25.96685
}
m_SizeDelta
:
{
x
:
51.9337
,
y
:
51.9337
}
m_SizeDelta
:
{
x
:
0
,
y
:
51.9337
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&9055497536415541340
---
!u!222
&9055497536415541340
CanvasRenderer
:
CanvasRenderer
:
...
@@ -871,7 +871,7 @@ RectTransform:
...
@@ -871,7 +871,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
144.8642
,
y
:
-25.96685
}
m_AnchoredPosition
:
{
x
:
144.8642
,
y
:
-25.96685
}
m_SizeDelta
:
{
x
:
51.9337
,
y
:
51.9337
}
m_SizeDelta
:
{
x
:
0
,
y
:
51.9337
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&6316850651786239132
---
!u!222
&6316850651786239132
CanvasRenderer
:
CanvasRenderer
:
...
@@ -1213,7 +1213,7 @@ RectTransform:
...
@@ -1213,7 +1213,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
83.71851
,
y
:
-25.96685
}
m_AnchoredPosition
:
{
x
:
83.71851
,
y
:
-25.96685
}
m_SizeDelta
:
{
x
:
51.9337
,
y
:
51.9337
}
m_SizeDelta
:
{
x
:
0
,
y
:
51.9337
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&6319844450247911941
---
!u!222
&6319844450247911941
CanvasRenderer
:
CanvasRenderer
:
...
@@ -1412,7 +1412,7 @@ GameObject:
...
@@ -1412,7 +1412,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&810524042309484015
---
!u!224
&810524042309484015
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1523,8 +1523,8 @@ RectTransform:
...
@@ -1523,8 +1523,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
16
,
y
:
25.967
}
m_AnchoredPosition
:
{
x
:
20
,
y
:
25.967
}
m_SizeDelta
:
{
x
:
76.011
,
y
:
51.934
}
m_SizeDelta
:
{
x
:
118.7
,
y
:
51.934
}
m_Pivot
:
{
x
:
0.5
,
y
:
1
}
m_Pivot
:
{
x
:
0.5
,
y
:
1
}
---
!u!222
&8147257740575675822
---
!u!222
&8147257740575675822
CanvasRenderer
:
CanvasRenderer
:
...
@@ -1599,7 +1599,7 @@ GameObject:
...
@@ -1599,7 +1599,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&5824509147393400757
---
!u!224
&5824509147393400757
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -2198,7 +2198,7 @@ RectTransform:
...
@@ -2198,7 +2198,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
206.00986
,
y
:
-25.96685
}
m_AnchoredPosition
:
{
x
:
206.00986
,
y
:
-25.96685
}
m_SizeDelta
:
{
x
:
51.9337
,
y
:
51.9337
}
m_SizeDelta
:
{
x
:
0
,
y
:
51.9337
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&3778932895135096301
---
!u!222
&3778932895135096301
CanvasRenderer
:
CanvasRenderer
:
...
@@ -2395,6 +2395,9 @@ MonoBehaviour:
...
@@ -2395,6 +2395,9 @@ MonoBehaviour:
_timerFill
:
{
fileID
:
2112913333798308398
}
_timerFill
:
{
fileID
:
2112913333798308398
}
_timerText
:
{
fileID
:
0
}
_timerText
:
{
fileID
:
0
}
_maxTime
:
30
_maxTime
:
30
_pointsContainer
:
{
fileID
:
5824509147393400757
}
_activePointColor
:
{
r
:
0.99607843
,
g
:
0.8431373
,
b
:
0
,
a
:
1
}
_inactivePointColor
:
{
r
:
0.99607843
,
g
:
0.8431373
,
b
:
0
,
a
:
0.5411765
}
onRestartClicked
:
onRestartClicked
:
m_PersistentCalls
:
m_PersistentCalls
:
m_Calls
:
[]
m_Calls
:
[]
...
@@ -2626,7 +2629,7 @@ GameObject:
...
@@ -2626,7 +2629,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&5776870742342999693
---
!u!224
&5776870742342999693
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -2828,7 +2831,7 @@ RectTransform:
...
@@ -2828,7 +2831,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
267.15555
,
y
:
-25.96685
}
m_AnchoredPosition
:
{
x
:
267.15555
,
y
:
-25.96685
}
m_SizeDelta
:
{
x
:
51.9337
,
y
:
51.9337
}
m_SizeDelta
:
{
x
:
0
,
y
:
51.9337
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&1293769170803587111
---
!u!222
&1293769170803587111
CanvasRenderer
:
CanvasRenderer
:
...
@@ -3108,7 +3111,7 @@ GameObject:
...
@@ -3108,7 +3111,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&7626717906572486054
---
!u!224
&7626717906572486054
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -3347,7 +3350,7 @@ GameObject:
...
@@ -3347,7 +3350,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&4797898653388170541
---
!u!224
&4797898653388170541
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
My project/Assets/ScienceStreet/TF/Scripts/TfGameManager.cs
View file @
7df88fa9
...
@@ -94,7 +94,6 @@ namespace com.al_arcade.tf
...
@@ -94,7 +94,6 @@ namespace com.al_arcade.tf
protected
override
void
BeginGameplay
()
protected
override
void
BeginGameplay
()
{
{
_progress
=
0
;
_progress
=
0
;
// Reset base counters
_currentIndex
=
_score
=
_streak
=
_correctCount
=
_wrongCount
=
_totalAsked
=
0
;
_currentIndex
=
_score
=
_streak
=
_correctCount
=
_wrongCount
=
_totalAsked
=
0
;
_state
=
TfGameState
.
Playing
;
_state
=
TfGameState
.
Playing
;
...
@@ -102,6 +101,8 @@ namespace com.al_arcade.tf
...
@@ -102,6 +101,8 @@ namespace com.al_arcade.tf
{
{
uiManager
.
ShowGameUI
();
uiManager
.
ShowGameUI
();
uiManager
.
SetProgress
(
0
,
stepsToWin
);
uiManager
.
SetProgress
(
0
,
stepsToWin
);
// ✅ NEW: reset points dots
uiManager
.
TickPoints
(
0
);
uiManager
.
EnableScore
(
IsChallengeMode
);
uiManager
.
EnableScore
(
IsChallengeMode
);
if
(
IsChallengeMode
&&
ChallengeManager
.
Instance
!=
null
)
if
(
IsChallengeMode
&&
ChallengeManager
.
Instance
!=
null
)
{
{
...
@@ -133,7 +134,7 @@ namespace com.al_arcade.tf
...
@@ -133,7 +134,7 @@ namespace com.al_arcade.tf
public
void
ResetGame
()
public
void
ResetGame
()
{
{
ResetBaseState
();
// clears shared counters + stops coroutines
ResetBaseState
();
_state
=
TfGameState
.
Idle
;
_state
=
TfGameState
.
Idle
;
_progress
=
0
;
_progress
=
0
;
_questions
=
null
;
_questions
=
null
;
...
@@ -147,7 +148,6 @@ namespace com.al_arcade.tf
...
@@ -147,7 +148,6 @@ namespace com.al_arcade.tf
}
}
// ─── Timer feedback override ──────────────────────────────────────────
// ─── Timer feedback override ──────────────────────────────────────────
// TF adjusts time on correct/wrong, so it needs direct access
public
float
GetTimeLeft
()
=>
_timeLeft
;
public
float
GetTimeLeft
()
=>
_timeLeft
;
// ─── Game loop ────────────────────────────────────────────────────────
// ─── Game loop ────────────────────────────────────────────────────────
...
@@ -186,7 +186,7 @@ namespace com.al_arcade.tf
...
@@ -186,7 +186,7 @@ namespace com.al_arcade.tf
_correctCount
++;
_correctCount
++;
_streak
++;
_streak
++;
_progress
++;
_progress
++;
_score
+=
CalculateStreakScore
();
// shared helper
_score
+=
CalculateStreakScore
();
if
(
handController
!=
null
)
handController
.
PlayCorrectFeedback
(
playerSaidTrue
);
if
(
handController
!=
null
)
handController
.
PlayCorrectFeedback
(
playerSaidTrue
);
if
(
productionLine
!=
null
)
yield
return
productionLine
.
MoveForward
(
stepDistance
);
if
(
productionLine
!=
null
)
yield
return
productionLine
.
MoveForward
(
stepDistance
);
...
@@ -200,7 +200,7 @@ namespace com.al_arcade.tf
...
@@ -200,7 +200,7 @@ namespace com.al_arcade.tf
if
(
particles
!=
null
)
if
(
particles
!=
null
)
particles
.
PlayCorrectBurst
(
new
Vector3
(-
2
,
6f
,
13
));
particles
.
PlayCorrectBurst
(
new
Vector3
(-
2
,
6f
,
13
));
UpdateTimerBy
(
4f
);
// shared helper
UpdateTimerBy
(
4f
);
uiManager
?.
UpdateTimer
(
_timeLeft
,
true
);
uiManager
?.
UpdateTimer
(
_timeLeft
,
true
);
}
}
else
else
...
@@ -224,7 +224,7 @@ namespace com.al_arcade.tf
...
@@ -224,7 +224,7 @@ namespace com.al_arcade.tf
.
SetEase
(
Ease
.
OutQuad
).
SetId
(
"camShake"
);
.
SetEase
(
Ease
.
OutQuad
).
SetId
(
"camShake"
);
}
}
UpdateTimerBy
(-
2f
);
// shared helper
UpdateTimerBy
(-
2f
);
uiManager
?.
UpdateTimer
(
_timeLeft
,
false
);
uiManager
?.
UpdateTimer
(
_timeLeft
,
false
);
}
}
...
@@ -235,6 +235,8 @@ namespace com.al_arcade.tf
...
@@ -235,6 +235,8 @@ namespace com.al_arcade.tf
{
{
uiManager
.
SetProgress
(
_progress
,
stepsToWin
);
uiManager
.
SetProgress
(
_progress
,
stepsToWin
);
uiManager
.
SetStreak
(
_streak
);
uiManager
.
SetStreak
(
_streak
);
// ✅ NEW: update points dots
uiManager
.
TickPoints
(
_progress
);
}
}
yield
return
new
WaitForSeconds
(
feedbackDuration
);
yield
return
new
WaitForSeconds
(
feedbackDuration
);
...
@@ -288,7 +290,6 @@ namespace com.al_arcade.tf
...
@@ -288,7 +290,6 @@ namespace com.al_arcade.tf
protected
override
IEnumerator
NoChallengeVictorySequence
()
protected
override
IEnumerator
NoChallengeVictorySequence
()
{
{
yield
return
new
WaitForSeconds
(
1.5f
);
yield
return
new
WaitForSeconds
(
1.5f
);
uiManager
?.
ShowResults
(
_score
,
_correctCount
,
_wrongCount
,
true
);
uiManager
?.
ShowResults
(
_score
,
_correctCount
,
_wrongCount
,
true
);
onGameComplete
?.
Invoke
();
onGameComplete
?.
Invoke
();
}
}
...
...
My project/Assets/ScienceStreet/TF/Scripts/TfUIManager.cs
View file @
7df88fa9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment