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
2be69c30
Commit
2be69c30
authored
Aug 04, 2019
by
17김현학
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
1a741171
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
SampleScene.unity
Assets/Scenes/SampleScene.unity
+0
-13
Square.cs
Assets/Scripts/Square.cs
+1
-1
UIManager.cs
Assets/Scripts/UIManager.cs
+10
-3
No files found.
Assets/Scenes/SampleScene.unity
View file @
2be69c30
...
...
@@ -1480,7 +1480,6 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
1256586416
}
-
component
:
{
fileID
:
1256586417
}
-
component
:
{
fileID
:
1256586418
}
m_Layer
:
5
m_Name
:
VelocitySlider
m_TagString
:
Untagged
...
...
@@ -1563,18 +1562,6 @@ MonoBehaviour:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
---
!u!114
&1256586418
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1256586415
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
e114018b688cebb48bea3ec355707687
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!1
&1271436244
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Scripts/Square.cs
View file @
2be69c30
...
...
@@ -23,6 +23,6 @@ public class Square : FlatLandObject
public
Vector3
GetMiddlePoint
(
int
st
,
int
en
)
{
return
(
pathList
[
en
]
-
pathList
[
st
])
/
2
;
return
(
(
pathList
[
en
]
-
pathList
[
st
])
/
2
)
+
pathList
[
st
]
;
}
}
\ No newline at end of file
Assets/Scripts/UIManager.cs
View file @
2be69c30
...
...
@@ -13,11 +13,15 @@ public class UIManager : MonoBehaviour
public
GameObject
canvas
;
public
GameObject
_pathUI
;
private
int
prevSelectPathNum
=
-
1
;
private
Text
pathName
;
private
Vector3
middlePoint
;
// Start is called before the first frame update
void
Start
()
{
_pathUI
.
SetActive
(
false
);
// _pathUI.SetActive(false);
pathName
=
_pathUI
.
transform
.
Find
(
"Name"
).
GetComponent
<
Text
>();
middlePoint
=
_pathUI
.
transform
.
position
;
}
// Update is called once per frame
...
...
@@ -38,7 +42,10 @@ public class UIManager : MonoBehaviour
if
(
pathNum
!=
prevSelectPathNum
)
{
_pathUI
.
transform
.
Find
(
"Name"
).
GetComponent
<
Text
>().
text
=
obj
.
name
;
pathName
.
text
=
obj
.
name
;
//_pathUI.transform.position = middlePoint;
_pathUI
.
transform
.
position
=
middlePoint
+
(
square
.
GetMiddlePoint
(
pathNum
,
pathNum
+
1
)
+
new
Vector3
(
0
,
300
,
0
))
*
2
;
//Debug.Log(square.GetMiddlePoint(pathNum, pathNum + 1));
_pathUI
.
SetActive
(
true
);
prevSelectPathNum
=
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