Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
colourful-love
Project
Overview
Details
Activity
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
Eko Simanjuntak
colourful-love
Commits
82c3a448
Commit
82c3a448
authored
Jan 06, 2018
by
Eko Simanjuntak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
starting level 3
parent
25c38151
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
3 deletions
+12
-3
storage.ide
.vs/Colorful Love/v15/sqlite3/storage.ide
+0
-0
Level 1.unity
Assets/Scenes/Level 1.unity
+1
-1
Level 3.unity
Assets/Scenes/Level 3.unity
+0
-0
BackgroundChanger.cs
Assets/Scripts/BackgroundChanger.cs
+10
-2
TagManager.asset
ProjectSettings/TagManager.asset
+1
-0
No files found.
.vs/Colorful Love/v15/sqlite3/storage.ide
View file @
82c3a448
No preview for this file type
Assets/Scenes/Level 1.unity
View file @
82c3a448
...
@@ -3372,7 +3372,7 @@ GameObject:
...
@@ -3372,7 +3372,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!212
&909257000
---
!u!212
&909257000
SpriteRenderer
:
SpriteRenderer
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/Scenes/Level 3.unity
View file @
82c3a448
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Assets/Scripts/BackgroundChanger.cs
View file @
82c3a448
...
@@ -8,7 +8,7 @@ public class BackgroundChanger : MonoBehaviour {
...
@@ -8,7 +8,7 @@ public class BackgroundChanger : MonoBehaviour {
private
List
<
GameObject
>
obstacleGroup
=
new
List
<
GameObject
>();
private
List
<
GameObject
>
obstacleGroup
=
new
List
<
GameObject
>();
private
GameObject
[]
gameObjectGroup
;
private
GameObject
[]
gameObjectGroup
;
private
GameObject
background
;
private
GameObject
background
;
private
string
[]
colors
=
{
"Blue"
,
"Green"
};
private
string
[]
colors
=
{
"Blue"
,
"Green"
,
"Yellow"
};
public
void
Start
()
public
void
Start
()
{
{
...
@@ -42,6 +42,9 @@ public class BackgroundChanger : MonoBehaviour {
...
@@ -42,6 +42,9 @@ public class BackgroundChanger : MonoBehaviour {
}
else
if
(
Input
.
GetKey
(
KeyCode
.
Z
))
}
else
if
(
Input
.
GetKey
(
KeyCode
.
Z
))
{
{
UpdateBackgroud
(
"Green"
);
UpdateBackgroud
(
"Green"
);
}
else
if
(
Input
.
GetKey
(
KeyCode
.
C
))
{
UpdateBackgroud
(
"Yellow"
);
}
}
}
}
...
@@ -53,13 +56,18 @@ public class BackgroundChanger : MonoBehaviour {
...
@@ -53,13 +56,18 @@ public class BackgroundChanger : MonoBehaviour {
}
else
if
(
tagColor
==
"Blue"
)
}
else
if
(
tagColor
==
"Blue"
)
{
{
background
.
GetComponent
<
SpriteRenderer
>().
color
=
new
Color32
(
65
,
131
,
215
,
255
);
background
.
GetComponent
<
SpriteRenderer
>().
color
=
new
Color32
(
65
,
131
,
215
,
255
);
}
else
if
(
tagColor
==
"Yellow"
)
{
background
.
GetComponent
<
SpriteRenderer
>().
color
=
new
Color32
(
255
,
193
,
7
,
255
);
}
}
UpdateObstacle
(
tagColor
);
UpdateObstacle
(
tagColor
);
}
}
private
void
UpdateObstacle
(
string
tagColor
)
private
void
UpdateObstacle
(
string
tagColor
)
{
{
Debug
.
Log
(
tagColor
);
foreach
(
GameObject
obstacle
in
obstacleGroup
)
foreach
(
GameObject
obstacle
in
obstacleGroup
)
{
{
if
(
obstacle
.
tag
==
tagColor
+
"Obstacle"
)
if
(
obstacle
.
tag
==
tagColor
+
"Obstacle"
)
...
...
ProjectSettings/TagManager.asset
View file @
82c3a448
...
@@ -7,6 +7,7 @@ TagManager:
...
@@ -7,6 +7,7 @@ TagManager:
-
BlueObstacle
-
BlueObstacle
-
GreenObstacle
-
GreenObstacle
-
Background
-
Background
-
YellowObstacle
layers
:
layers
:
-
Default
-
Default
-
TransparentFX
-
TransparentFX
...
...
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