Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
curvedflats
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Boards
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
Flatland
curvedflats
Commits
af4780c9
Commit
af4780c9
authored
Aug 23, 2019
by
Chae Ho Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Clock Level
parent
a36508da
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
901 additions
and
1062 deletions
+901
-1062
Player.prefab
Assets/Prefabs/Player.prefab
+3
-1
ClockLevel.unity
Assets/Scenes/ClockLevel.unity
+817
-1058
CollisionPreset.cs
Assets/Scripts/Collision/CollisionPreset.cs
+3
-3
ClockLevelManager.cs
Assets/Scripts/LevelManager/ClockLevelManager.cs
+17
-0
ClockLevelManager.cs.meta
Assets/Scripts/LevelManager/ClockLevelManager.cs.meta
+11
-0
LinkedClock.cs
Assets/Scripts/ObjectMovement/LinkedClock.cs
+39
-0
LinkedClock.cs.meta
Assets/Scripts/ObjectMovement/LinkedClock.cs.meta
+11
-0
No files found.
Assets/Prefabs/Player.prefab
View file @
af4780c9
...
...
@@ -306,7 +306,7 @@ SphereCollider:
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Radius
:
0.5
m_Radius
:
1
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&951264407139232476
MonoBehaviour
:
...
...
@@ -375,8 +375,10 @@ MonoBehaviour:
levelManager
:
{
fileID
:
0
}
gamma
:
1
time
:
0
apparenttime
:
0
theobject
:
{
fileID
:
951264407063557756
}
mass
:
1
isClock
:
0
background
:
{
fileID
:
951264406399792102
}
uiManager
:
{
fileID
:
0
}
---
!u!1
&951264407764097795
...
...
Assets/Scenes/ClockLevel.unity
View file @
af4780c9
This diff is collapsed.
Click to expand it.
Assets/Scripts/Collision/CollisionPreset.cs
View file @
af4780c9
...
...
@@ -9,7 +9,7 @@
new
CollisionType
(
ObjectType
.
player
,
true
),
new
CollisionType
(
ObjectType
.
normalobject
,
true
),
new
CollisionType
(
ObjectType
.
interactive
,
false
),
new
CollisionType
(
ObjectType
.
clock
,
tru
e
),
new
CollisionType
(
ObjectType
.
clock
,
fals
e
),
new
CollisionType
(
ObjectType
.
wall
,
true
)
};
...
...
@@ -30,10 +30,10 @@
};
public
static
CollisionType
[]
Clock
{
get
;
private
set
;
}
=
{
new
CollisionType
(
ObjectType
.
player
,
tru
e
),
new
CollisionType
(
ObjectType
.
player
,
fals
e
),
new
CollisionType
(
ObjectType
.
normalobject
,
true
),
new
CollisionType
(
ObjectType
.
interactive
,
false
),
new
CollisionType
(
ObjectType
.
clock
,
tru
e
),
new
CollisionType
(
ObjectType
.
clock
,
fals
e
),
new
CollisionType
(
ObjectType
.
wall
,
true
)
};
...
...
Assets/Scripts/LevelManager/ClockLevelManager.cs
0 → 100644
View file @
af4780c9
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
ClockLevelManager
:
LevelManager
{
// Start is called before the first frame update
protected
override
void
Start
()
{
ExplanationText
=
new
string
[]
{
"파란색 시계와 빨간색 시계는 20초씩 어긋나 있다."
,
"이 둘의 시간 차가 2초 이하가 되게 만들어 서로 붇히면 레벨 Clear!"
};
Todo
=
"빨강 & 파랑 시계 차이가 2초 이하 되게 만들어 붙히기."
;
base
.
Start
();
}
}
Assets/Scripts/LevelManager/ClockLevelManager.cs.meta
0 → 100644
View file @
af4780c9
fileFormatVersion: 2
guid: 964860b1293e755448c6009070e0ef62
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/ObjectMovement/LinkedClock.cs
0 → 100644
View file @
af4780c9
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
UnityEngine
;
public
class
LinkedClock
:
Clock
{
public
Clock
otherclock
;
public
override
void
OnCollisionStaychild
(
Collision
collision
)
{
base
.
OnCollisionStaychild
(
collision
);
//Debug.Log("hit!");
//if(collision.transform.parent.name != "AnObject(Clone)")
// Debug.Log(collision.gameObject.name + " wow!");
if
(
collision
.
transform
.
parent
!=
null
)
{
var
x
=
collision
.
transform
.
parent
.
gameObject
.
GetComponent
(
typeof
(
Clock
))
as
Clock
;
if
(
x
!=
null
&&
x
.
Equals
(
otherclock
))
{
Debug
.
Log
(
"hit!"
);
if
(
Mathf
.
Abs
((
float
)(
otherclock
.
GetTime
()
-
time
))
<=
2.0f
)
{
levelManager
.
WinState
=
true
;
}
else
{
Debug
.
Log
(
Mathf
.
Abs
((
float
)(
otherclock
.
GetTime
()
-
time
)));
}
}
}
}
}
Assets/Scripts/ObjectMovement/LinkedClock.cs.meta
0 → 100644
View file @
af4780c9
fileFormatVersion: 2
guid: 37142b9be36036449855b563a41b4337
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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