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
3ea8a212
Commit
3ea8a212
authored
Feb 25, 2026
by
Yousef Sameh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2D
parent
fe4b8e7f
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
310 additions
and
93 deletions
+310
-93
Bot.prefab
My project/Assets/Prefabs/CS/Bot.prefab
+3
-3
Env V2.prefab
My project/Assets/Prefabs/CS/Env V2.prefab
+3
-3
CS.unity
My project/Assets/Scenes/CS/CS.unity
+2
-1
CsPrefabBuilder.cs
...roject/Assets/ScienceStreet/CS/Scripts/CsPrefabBuilder.cs
+6
-1
CsWordButton.cs
My project/Assets/ScienceStreet/CS/Scripts/CsWordButton.cs
+20
-27
CsWordButton.cs.meta
...ject/Assets/ScienceStreet/CS/Scripts/CsWordButton.cs.meta
+11
-1
SSColorPalette.cs
...ect/Assets/ScienceStreet/Shared/Scripts/SSColorPalette.cs
+26
-26
CurrentMaximizeLayout.dwlt
My project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt
+239
-31
No files found.
My project/Assets/Prefabs/CS/Bot.prefab
View file @
3ea8a212
...
...
@@ -118,15 +118,15 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4431084402279646
,
guid
:
8e0f285c21cdcf14e8d5c06c57ba936b
,
type
:
3
}
propertyPath
:
m_LocalScale.x
value
:
20
value
:
15
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4431084402279646
,
guid
:
8e0f285c21cdcf14e8d5c06c57ba936b
,
type
:
3
}
propertyPath
:
m_LocalScale.y
value
:
20
value
:
15
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4431084402279646
,
guid
:
8e0f285c21cdcf14e8d5c06c57ba936b
,
type
:
3
}
propertyPath
:
m_LocalScale.z
value
:
20
value
:
15
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4431084402279646
,
guid
:
8e0f285c21cdcf14e8d5c06c57ba936b
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
My project/Assets/Prefabs/CS/Env V2.prefab
View file @
3ea8a212
...
...
@@ -76,10 +76,10 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
Assembly-CSharp::ScienceStreet.Shared.FloatingScienceSpawner
spawnCount
:
12
areaSize
:
{
x
:
50
,
y
:
18
,
z
:
10
}
areaSize
:
{
x
:
20
,
y
:
10
,
z
:
10
}
areaCenterOffset
:
{
x
:
0
,
y
:
0
,
z
:
0
}
minScale
:
1.2
maxScale
:
2
minScale
:
0.4
maxScale
:
0.7
jitterAmount
:
0.8
gizmoColor
:
{
r
:
0
,
g
:
1
,
b
:
1
,
a
:
0.3
}
showGizmoAlways
:
1
...
...
My project/Assets/Scenes/CS/CS.unity
View file @
3ea8a212
...
...
@@ -261,6 +261,7 @@ MonoBehaviour:
gradeId
:
0
questionCount
:
8
classCode
:
wordSprite
:
{
fileID
:
21300000
,
guid
:
a54a00aa58b9b455c895e9312d25164d
,
type
:
3
}
useOfflineTestData
:
0
---
!u!4
&1145369048
Transform
:
...
...
@@ -356,7 +357,7 @@ Camera:
near clip plane
:
0.3
far clip plane
:
1000
field of view
:
60
orthographic
:
0
orthographic
:
1
orthographic size
:
5
m_Depth
:
-1
m_CullingMask
:
...
...
My project/Assets/ScienceStreet/CS/Scripts/CsPrefabBuilder.cs
View file @
3ea8a212
...
...
@@ -13,7 +13,7 @@ namespace com.al_arcade.cs
[
AddComponentMenu
(
"Science Street/CS Prefab Builder"
)]
public
class
CsPrefabBuilder
:
MonoBehaviour
{
public
static
CsPrefabBuilder
Instance
{
get
;
private
set
;
}
[
Header
(
"Scene Environment"
)]
[
Tooltip
(
"Your full environment prefab (ground, platform, decorations, etc). Spawned at origin."
)]
...
...
@@ -87,6 +87,9 @@ namespace com.al_arcade.cs
[
SerializeField
]
private
int
questionCount
=
8
;
[
SerializeField
]
private
string
classCode
=
""
;
[
Header
(
"Word"
)]
public
Sprite
wordSprite
;
[
Header
(
"Debug"
)]
[
SerializeField
]
private
bool
useOfflineTestData
=
false
;
...
...
@@ -98,6 +101,8 @@ namespace com.al_arcade.cs
private
void
Start
()
{
Instance
=
this
;
DOTween
.
Init
();
if
(
arabicFont
!=
null
)
SSFontManager
.
Font
=
arabicFont
;
StartCoroutine
(
BuildEverything
());
...
...
My project/Assets/ScienceStreet/CS/Scripts/CsWordButton.cs
View file @
3ea8a212
...
...
@@ -15,7 +15,7 @@ namespace com.al_arcade.cs
public
int
Index
{
get
;
private
set
;
}
private
GameObject
_background
;
private
Material
_bgMaterial
;
// private Material _bgMaterial; // Removed shader material usage
private
Canvas
_canvas
;
private
UniText
_uniText
;
// Assuming the class name is UniText in UniText namespace
private
BoxCollider
_collider
;
...
...
@@ -24,8 +24,7 @@ namespace com.al_arcade.cs
private
Sequence
_idleAnim
;
private
float
_cardWidth
;
private
float
_cardHeight
=
0.8f
;
private
Sprite
_wordSprite
;
private
Image
_backgroundImage
;
public
void
Setup
(
string
text
,
bool
isWrong
,
int
index
,
...
...
@@ -49,20 +48,14 @@ namespace com.al_arcade.cs
private
void
BuildVisuals
()
{
var
shader
=
Shader
.
Find
(
"ScienceStreet/SciFiTextBackground"
)
??
Shader
.
Find
(
"Standard"
)
??
Shader
.
Find
(
"Unlit/Color"
);
_background
=
GameObject
.
CreatePrimitive
(
PrimitiveType
.
Cube
);
_background
.
name
=
"WordBg"
;
_background
.
transform
.
SetParent
(
transform
);
_background
.
transform
.
localPosition
=
Vector3
.
zero
;
_background
.
transform
.
localScale
=
new
Vector3
(
_cardWidth
,
_cardHeight
,
0.08f
);
Destroy
(
_background
.
GetComponent
<
Collider
>());
_bgMaterial
=
new
Material
(
shader
);
_bgMaterial
.
SetFloat
(
"_State"
,
0f
);
_background
.
GetComponent
<
Renderer
>().
material
=
_bgMaterial
;
_background
.
GetComponent
<
Renderer
>().
shadowCastingMode
=
UnityEngine
.
Rendering
.
ShadowCastingMode
.
Off
;
Destroy
(
_background
.
GetComponent
<
MeshRenderer
>());
Destroy
(
_background
.
GetComponent
<
MeshFilter
>());
var
canvasObj
=
new
GameObject
(
"WordCanvas"
);
canvasObj
.
transform
.
SetParent
(
transform
);
...
...
@@ -78,6 +71,12 @@ namespace com.al_arcade.cs
rt
.
localScale
=
new
Vector3
(
canvasScale
,
canvasScale
,
canvasScale
);
rt
.
sizeDelta
=
new
Vector2
(
_cardWidth
/
canvasScale
,
_cardHeight
/
canvasScale
);
_backgroundImage
=
canvasObj
.
AddComponent
<
Image
>();
_backgroundImage
.
sprite
=
CsPrefabBuilder
.
Instance
.
wordSprite
;
_backgroundImage
.
type
=
Image
.
Type
.
Sliced
;
_backgroundImage
.
pixelsPerUnitMultiplier
=
3f
;
_backgroundImage
.
color
=
SSColorPalette
.
NeutralWord
;
var
textObj
=
new
GameObject
(
"UniText"
);
textObj
.
transform
.
SetParent
(
canvasObj
.
transform
);
textObj
.
transform
.
localPosition
=
Vector3
.
zero
;
...
...
@@ -137,7 +136,7 @@ namespace com.al_arcade.cs
_idleAnim
?.
Kill
();
_idleAnim
=
null
;
DOTween
.
Kill
(
transform
);
if
(
_b
gMaterial
!=
null
)
DOTween
.
Kill
(
_bgMaterial
);
if
(
_b
ackgroundImage
!=
null
)
DOTween
.
Kill
(
_backgroundImage
);
}
...
...
@@ -165,24 +164,20 @@ namespace com.al_arcade.cs
private
void
UpdateVisuals
()
{
DOTween
.
Kill
(
_b
gMaterial
,
"color"
);
DOTween
.
Kill
(
_b
ackgroundImage
,
"color"
);
DOTween
.
Kill
(
transform
,
"scale"
);
if
(
_isHighlighted
)
{
// Pulsing highlight state
_bgMaterial
.
SetFloat
(
"_State"
,
1f
);
Color
target
=
SSColorPalette
.
WithAlpha
(
SSColorPalette
.
Primary
,
0.4f
);
_bgMaterial
.
DOColor
(
target
,
0.2f
).
SetId
(
"color"
);
Color
target
=
SSColorPalette
.
Primary
;
_backgroundImage
.
DOColor
(
target
,
0.2f
).
SetId
(
"color"
);
}
else
{
// Normal or Hover state
_bgMaterial
.
SetFloat
(
"_State"
,
_isHovered
?
1f
:
0f
);
Color
target
=
_isHovered
?
SSColorPalette
.
WithAlpha
(
SSColorPalette
.
Primary
,
0.4f
)
?
SSColorPalette
.
Primary
:
SSColorPalette
.
NeutralWord
;
_b
gMaterial
.
DOColor
(
target
,
0.2f
).
SetId
(
"color"
);
_b
ackgroundImage
.
DOColor
(
target
,
0.2f
).
SetId
(
"color"
);
}
float
targetScale
=
_isHovered
?
1.1f
:
1.0f
;
...
...
@@ -217,9 +212,8 @@ namespace com.al_arcade.cs
transform
.
DOShakeRotation
(
0.3f
,
5f
,
15
);
// Flash color to wrong, then return to appropriate state
_bgMaterial
.
SetFloat
(
"_State"
,
3f
);
// Shader Wrong state
DOTween
.
Kill
(
_bgMaterial
,
"color"
);
_bgMaterial
.
DOColor
(
SSColorPalette
.
Danger
,
0.15f
)
DOTween
.
Kill
(
_backgroundImage
,
"color"
);
_backgroundImage
.
DOColor
(
SSColorPalette
.
Danger
,
0.15f
)
.
SetId
(
"color"
)
.
OnComplete
(()
=>
{
...
...
@@ -237,9 +231,8 @@ namespace com.al_arcade.cs
if
(
_uniText
!=
null
)
_uniText
.
Text
=
newText
;
WordText
=
newText
;
_isHighlighted
=
false
;
DOTween
.
Kill
(
_bgMaterial
);
_bgMaterial
.
color
=
SSColorPalette
.
CorrectWord
;
_bgMaterial
.
SetFloat
(
"_State"
,
2f
);
// Shader Correct state
DOTween
.
Kill
(
_backgroundImage
,
"color"
);
_backgroundImage
.
color
=
SSColorPalette
.
CorrectWord
;
});
seq
.
Append
(
transform
.
DOScale
(
Vector3
.
one
*
1.2f
,
0.3f
).
SetEase
(
Ease
.
OutBack
));
seq
.
Append
(
transform
.
DOScale
(
Vector3
.
one
,
0.15f
));
...
...
My project/Assets/ScienceStreet/CS/Scripts/CsWordButton.cs.meta
View file @
3ea8a212
fileFormatVersion: 2
guid: 3a1740bd1ab0648cd9fa5c2b5d9a5d66
\ No newline at end of file
guid: 3a1740bd1ab0648cd9fa5c2b5d9a5d66
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- _wordSprite: {fileID: 21300000, guid: a54a00aa58b9b455c895e9312d25164d, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
My project/Assets/ScienceStreet/Shared/Scripts/SSColorPalette.cs
View file @
3ea8a212
...
...
@@ -9,36 +9,36 @@ namespace com.al_arcade.shared
public
static
class
SSColorPalette
{
public
static
readonly
Color
Primary
=
new
Color32
(
48
,
48
,
208
,
255
);
public
static
readonly
Color
PrimaryDark
=
new
Color32
(
32
,
32
,
168
,
255
);
public
static
readonly
Color
Primary
=
new
Color32
(
48
,
48
,
208
,
255
);
public
static
readonly
Color
PrimaryDark
=
new
Color32
(
32
,
32
,
168
,
255
);
public
static
readonly
Color
PrimaryLight
=
new
Color32
(
80
,
80
,
220
,
255
);
public
static
readonly
Color
Accent
=
new
Color32
(
254
,
215
,
0
,
255
);
public
static
readonly
Color
AccentDark
=
new
Color32
(
212
,
180
,
0
,
255
);
public
static
readonly
Color
Accent
=
new
Color32
(
254
,
215
,
0
,
255
);
public
static
readonly
Color
AccentDark
=
new
Color32
(
212
,
180
,
0
,
255
);
public
static
readonly
Color
Success
=
new
Color32
(
16
,
185
,
129
,
255
);
public
static
readonly
Color
Success
=
new
Color32
(
16
,
185
,
129
,
255
);
public
static
readonly
Color
SuccessLight
=
new
Color32
(
209
,
250
,
229
,
255
);
public
static
readonly
Color
Danger
=
new
Color32
(
239
,
68
,
68
,
255
);
public
static
readonly
Color
DangerLight
=
new
Color32
(
254
,
226
,
226
,
255
);
public
static
readonly
Color
Warning
=
new
Color32
(
245
,
158
,
11
,
255
);
public
static
readonly
Color
Info
=
new
Color32
(
59
,
130
,
246
,
255
);
public
static
readonly
Color
Background
=
new
Color32
(
238
,
240
,
248
,
255
);
public
static
readonly
Color
Card
=
Color
.
white
;
public
static
readonly
Color
TextDark
=
new
Color32
(
26
,
26
,
46
,
255
);
public
static
readonly
Color
TextMuted
=
new
Color32
(
107
,
114
,
128
,
255
);
public
static
readonly
Color
Border
=
new
Color32
(
229
,
231
,
235
,
255
);
public
static
readonly
Color
GateCorrect
=
new
Color32
(
16
,
185
,
129
,
255
);
public
static
readonly
Color
GateWrong
=
new
Color32
(
239
,
68
,
68
,
255
);
public
static
readonly
Color
GateDefault
=
new
Color32
(
80
,
80
,
220
,
255
);
public
static
readonly
Color
TrueGreen
=
new
Color32
(
34
,
197
,
94
,
255
);
public
static
readonly
Color
FalseRed
=
new
Color32
(
239
,
68
,
68
,
255
);
public
static
readonly
Color
WrongWord
=
new
Color32
(
239
,
68
,
68
,
255
);
public
static
readonly
Color
CorrectWord
=
new
Color32
(
179
,
255
,
128
,
255
);
public
static
readonly
Color
NeutralWord
=
new
Color32
(
248
,
249
,
252
,
255
);
public
static
readonly
Color
Danger
=
new
Color32
(
239
,
68
,
68
,
255
);
public
static
readonly
Color
DangerLight
=
new
Color32
(
254
,
226
,
226
,
255
);
public
static
readonly
Color
Warning
=
new
Color32
(
245
,
158
,
11
,
255
);
public
static
readonly
Color
Info
=
new
Color32
(
59
,
130
,
246
,
255
);
public
static
readonly
Color
Background
=
new
Color32
(
238
,
240
,
248
,
255
);
public
static
readonly
Color
Card
=
Color
.
white
;
public
static
readonly
Color
TextDark
=
new
Color32
(
26
,
26
,
46
,
255
);
public
static
readonly
Color
TextMuted
=
new
Color32
(
107
,
114
,
128
,
255
);
public
static
readonly
Color
Border
=
new
Color32
(
229
,
231
,
235
,
255
);
public
static
readonly
Color
GateCorrect
=
new
Color32
(
16
,
185
,
129
,
255
);
public
static
readonly
Color
GateWrong
=
new
Color32
(
239
,
68
,
68
,
255
);
public
static
readonly
Color
GateDefault
=
new
Color32
(
80
,
80
,
220
,
255
);
public
static
readonly
Color
TrueGreen
=
new
Color32
(
34
,
197
,
94
,
255
);
public
static
readonly
Color
FalseRed
=
new
Color32
(
239
,
68
,
68
,
255
);
public
static
readonly
Color
WrongWord
=
new
Color32
(
239
,
68
,
68
,
255
);
public
static
readonly
Color
CorrectWord
=
new
Color32
(
179
,
255
,
128
,
255
);
public
static
readonly
Color
NeutralWord
=
new
Color32
(
56
,
139
,
255
,
255
);
public
static
Color
WithAlpha
(
Color
c
,
float
a
)
...
...
My project/UserSettings/Layouts/CurrentMaximizeLayout.dwlt
View file @
3ea8a212
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