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
e0b61434
Commit
e0b61434
authored
Aug 22, 2019
by
16이진형
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
레벨 메니저 기초 작업
parent
585600a4
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
108 additions
and
15 deletions
+108
-15
AlertManager.cs
Assets/AlertManager.cs
+2
-2
Test.unity
Assets/Scenes/Test.unity
+2
-1
LevelManager.meta
Assets/Scripts/LevelManager.meta
+1
-1
Level1Manager.cs
Assets/Scripts/LevelManager/Level1Manager.cs
+2
-6
Level1Manager.cs.meta
Assets/Scripts/LevelManager/Level1Manager.cs.meta
+11
-0
abstract.meta
Assets/Scripts/LevelManager/abstract.meta
+8
-0
LevelManager.cs
Assets/Scripts/LevelManager/abstract/LevelManager.cs
+69
-0
LevelManager.cs.meta
Assets/Scripts/LevelManager/abstract/LevelManager.cs.meta
+0
-0
Clock.cs
Assets/Scripts/ObjectMovement/Clock.cs
+1
-1
UIManager.cs
Assets/Scripts/UIManager.cs
+12
-4
No files found.
Assets/AlertManager.cs
View file @
e0b61434
...
@@ -21,8 +21,8 @@ public class AlertManager : MonoBehaviour
...
@@ -21,8 +21,8 @@ public class AlertManager : MonoBehaviour
void
Start
()
void
Start
()
{
{
Close
();
Close
();
string
[]
aa
=
{
"a"
,
"b"
};
//
string[] aa = { "a","b" };
Alert
(
aa
);
//
Alert(aa);
}
}
// Update is called once per frame
// Update is called once per frame
...
...
Assets/Scenes/Test.unity
View file @
e0b61434
...
@@ -398,6 +398,7 @@ MonoBehaviour:
...
@@ -398,6 +398,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
14f968d942299c84ca786317f6de8274
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
14f968d942299c84ca786317f6de8274
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
uiManager
:
{
fileID
:
394305455
}
gamma
:
0
gamma
:
0
player
:
{
fileID
:
739347346
}
player
:
{
fileID
:
739347346
}
winstate
:
0
winstate
:
0
...
@@ -1063,7 +1064,7 @@ MonoBehaviour:
...
@@ -1063,7 +1064,7 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
0.19607843
,
g
:
0.19607843
,
b
:
0.19607843
,
a
:
1
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_OnCullStateChanged
:
m_PersistentCalls
:
m_PersistentCalls
:
...
...
Assets/Scripts/
Game
Manager.meta
→
Assets/Scripts/
Level
Manager.meta
View file @
e0b61434
fileFormatVersion: 2
fileFormatVersion: 2
guid:
873b374412d1e9f40aa3636ed9e2bdf8
guid:
28d090e32f2ee964db867d683e0efa36
folderAsset: yes
folderAsset: yes
DefaultImporter:
DefaultImporter:
externalObjects: {}
externalObjects: {}
...
...
Assets/Scripts/LevelManager.cs
→
Assets/Scripts/LevelManager
/Level1Manager
.cs
View file @
e0b61434
...
@@ -2,16 +2,12 @@
...
@@ -2,16 +2,12 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
public
class
Level
Manager
:
MonoBehaviou
r
public
class
Level
1Manager
:
LevelManage
r
{
{
public
double
gamma
;
public
PlayerMovement
player
;
public
bool
winstate
=
false
;
// Start is called before the first frame update
// Start is called before the first frame update
void
Start
()
void
Start
()
{
{
winstate
=
false
;
}
}
// Update is called once per frame
// Update is called once per frame
...
...
Assets/Scripts/LevelManager/Level1Manager.cs.meta
0 → 100644
View file @
e0b61434
fileFormatVersion: 2
guid: 85f33cc515852874d98f6c1e43799fe5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/LevelManager/abstract.meta
0 → 100644
View file @
e0b61434
fileFormatVersion: 2
guid: 863d3674af79b2d428796d1d39759169
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/LevelManager/abstract/LevelManager.cs
0 → 100644
View file @
e0b61434
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
LevelManager
:
MonoBehaviour
{
public
UIManager
uiManager
;
public
double
gamma
;
public
PlayerMovement
player
;
[
SerializeField
]
protected
bool
winstate
=
false
;
// Start is called before the first frame update
void
Start
()
{
winstate
=
false
;
}
// Update is called once per frame
void
Update
()
{
if
(
WinCondition
())
{
WinState
=
true
;
}
if
(
LoseCondition
())
{
WinState
=
false
;
}
}
protected
virtual
void
OnWin
()
{
uiManager
.
WinTextOn
();
}
protected
virtual
void
OnLose
()
{
}
protected
virtual
bool
LoseCondition
()
{
return
false
;
}
protected
virtual
bool
WinCondition
()
{
return
false
;
}
public
virtual
bool
WinState
{
set
{
if
(
value
)
{
//if win
OnWin
();
}
else
{
//if lose
OnLose
();
}
}
}
}
Assets/Scripts/LevelManager.cs.meta
→
Assets/Scripts/LevelManager
/abstract/LevelManager
.cs.meta
View file @
e0b61434
File moved
Assets/Scripts/ObjectMovement/Clock.cs
View file @
e0b61434
...
@@ -30,7 +30,7 @@ public class Clock : GrabableObject
...
@@ -30,7 +30,7 @@ public class Clock : GrabableObject
Debug
.
Log
(
"hit!"
);
Debug
.
Log
(
"hit!"
);
if
(
Mathf
.
Abs
((
float
)(
otherclock
.
GetTime
()
-
time
))
<=
1.0f
)
if
(
Mathf
.
Abs
((
float
)(
otherclock
.
GetTime
()
-
time
))
<=
1.0f
)
{
{
levelManager
.
wins
tate
=
true
;
levelManager
.
WinS
tate
=
true
;
}
}
else
else
{
{
...
...
Assets/Scripts/UIManager.cs
View file @
e0b61434
...
@@ -65,10 +65,6 @@ public class UIManager : MonoBehaviour
...
@@ -65,10 +65,6 @@ public class UIManager : MonoBehaviour
mytime
.
text
=
levelManager
.
player
.
time
.
ToString
()
+
" s"
;
mytime
.
text
=
levelManager
.
player
.
time
.
ToString
()
+
" s"
;
//clock1time.text = clock1.GetTime().ToString() + " s";
//clock1time.text = clock1.GetTime().ToString() + " s";
//clock2time.text = clock2.GetTime().ToString() + " s";
//clock2time.text = clock2.GetTime().ToString() + " s";
if
(
levelManager
.
winstate
)
{
wintext
.
gameObject
.
SetActive
(
true
);
}
//마우스 클릭시
//마우스 클릭시
...
@@ -180,6 +176,18 @@ public class UIManager : MonoBehaviour
...
@@ -180,6 +176,18 @@ public class UIManager : MonoBehaviour
return
new
Vector3
(
v
.
x
,
v
.
z
,
0.0f
);
return
new
Vector3
(
v
.
x
,
v
.
z
,
0.0f
);
}
}
public
void
WinTextOn
()
{
wintext
.
gameObject
.
SetActive
(
true
);
wintext
.
GetComponent
<
Text
>().
text
=
"Clear!"
;
}
public
void
LoseTextOn
()
{
wintext
.
gameObject
.
SetActive
(
true
);
wintext
.
GetComponent
<
Text
>().
text
=
"Lose"
;
}
private
void
updatePathInfo
(
int
pathNum
)
private
void
updatePathInfo
(
int
pathNum
)
{
{
pathName
.
text
=
"Path - "
+
pathNum
;
pathName
.
text
=
"Path - "
+
pathNum
;
...
...
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