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
9aec2d93
Commit
9aec2d93
authored
Aug 20, 2019
by
17김현학
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
draw square to select path
parent
e6bc3464
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
149 additions
and
4 deletions
+149
-4
Image.prefab
Assets/Prefabs/Image.prefab
+77
-0
Image.prefab.meta
Assets/Prefabs/Image.prefab.meta
+7
-0
Test.unity
Assets/Scenes/Test.unity
+15
-0
PathRenderer.cs
Assets/Scripts/PathRenderer.cs
+0
-3
UIManager.cs
Assets/Scripts/UIManager.cs
+0
-1
SelectArea.cs
Assets/SelectArea.cs
+39
-0
SelectArea.cs.meta
Assets/SelectArea.cs.meta
+11
-0
No files found.
Assets/Prefabs/Image.prefab
0 → 100644
View file @
9aec2d93
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!1
&4717358246729322577
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
481547545775494362
}
-
component
:
{
fileID
:
8216549582370772806
}
-
component
:
{
fileID
:
1198387274067299882
}
m_Layer
:
5
m_Name
:
Image
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!224
&481547545775494362
RectTransform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
4717358246729322577
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
-0.5
,
y
:
-0.5
}
m_SizeDelta
:
{
x
:
1
,
y
:
1
}
m_Pivot
:
{
x
:
0
,
y
:
0
}
---
!u!222
&8216549582370772806
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
4717358246729322577
}
m_CullTransparentMesh
:
0
---
!u!114
&1198387274067299882
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
4717358246729322577
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
fe87c0e1cc204ed48ad3b37840f39efc
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
0.48235294
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite
:
{
fileID
:
21300000
,
guid
:
0905f15ba4c169d478723617ce3c4ad1
,
type
:
3
}
m_Type
:
0
m_PreserveAspect
:
0
m_FillCenter
:
1
m_FillMethod
:
4
m_FillAmount
:
1
m_FillClockwise
:
1
m_FillOrigin
:
0
m_UseSpriteMesh
:
0
m_PixelsPerUnitMultiplier
:
1
Assets/Prefabs/Image.prefab.meta
0 → 100644
View file @
9aec2d93
fileFormatVersion: 2
guid: ea897371ce88d8541b961fedac9ceb8e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/Test.unity
View file @
9aec2d93
...
...
@@ -629,6 +629,7 @@ GameObject:
m_Component:
- component: {fileID: 394305456}
- component: {fileID: 394305455}
- component: {fileID: 394305457}
m_Layer: 0
m_Name: UIManager
m_TagString: Untagged
...
...
@@ -674,6 +675,20 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &394305457
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 394305454}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4cac6e9f5a929c3459ede6049a34ff3b, type: 3}
m_Name:
m_EditorClassIdentifier:
sd: {fileID: 4717358246729322577, guid: ea897371ce88d8541b961fedac9ceb8e, type: 3}
canvas: {fileID: 1193230064}
--- !u!1 &439858915
GameObject:
m_ObjectHideFlags: 0
...
...
Assets/Scripts/PathRenderer.cs
View file @
9aec2d93
...
...
@@ -211,7 +211,6 @@ public class PathRenderer : MonoBehaviour
//square.PathList에서 0에서 시작해 finalPathNum까지 이동
var
startPosition
=
levelManager
.
player
.
transform
.
position
;
Debug
.
Log
(
startPosition
+
"test"
);
while
(
i
<=
finalPathNum
)
{
...
...
@@ -277,7 +276,6 @@ public class PathRenderer : MonoBehaviour
i
++;
}
Debug
.
Log
(
levelManager
.
player
.
transform
.
position
+
"test"
);
shiftPath
(
i
,
levelManager
.
player
.
transform
.
position
-
startPosition
);
Background
.
Toggle
=
true
;
pathcreatable
=
true
;
...
...
@@ -310,7 +308,6 @@ public class PathRenderer : MonoBehaviour
square
.
pathVelocity
.
RemoveRange
(
1
,
times
);
deltaPosition
=
ui
.
getXYVectorfromXZVector
(
deltaPosition
);
Debug
.
Log
(
deltaPosition
+
"test"
);
int
i
;
for
(
i
=
0
;
i
<
times
;
i
++)
...
...
Assets/Scripts/UIManager.cs
View file @
9aec2d93
...
...
@@ -201,7 +201,6 @@ public class UIManager : MonoBehaviour
if
(
Physics
.
Raycast
(
ray
,
out
hit2
))
{
var
obj
=
hit2
.
collider
.
gameObject
;
Debug
.
Log
(
obj
.
tag
);
if
(
obj
.
tag
==
"path"
)
{
int
pathNum
=
int
.
Parse
(
obj
.
name
.
Substring
(
13
));
...
...
Assets/SelectArea.cs
0 → 100644
View file @
9aec2d93
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine.UI
;
using
UnityEngine
;
public
class
SelectArea
:
MonoBehaviour
{
public
GameObject
sd
;
public
Canvas
canvas
;
Vector3
startPos
,
endPos
;
GameObject
tempDrag
;
void
Start
()
{
}
void
Update
()
{
if
(
Input
.
GetMouseButtonDown
(
0
))
{
startPos
=
new
Vector3
(
Input
.
mousePosition
.
x
,
Input
.
mousePosition
.
y
,
0
);
tempDrag
=
Instantiate
(
sd
,
startPos
,
Quaternion
.
identity
)
as
GameObject
;
tempDrag
.
transform
.
parent
=
canvas
.
transform
;
}
if
(
Input
.
GetMouseButton
(
0
))
{
endPos
=
new
Vector3
(
Input
.
mousePosition
.
x
,
Input
.
mousePosition
.
y
,
0
);
tempDrag
.
transform
.
localScale
=
new
Vector3
(
endPos
.
x
-
startPos
.
x
,
endPos
.
y
-
startPos
.
y
,
0
);
}
if
(
Input
.
GetMouseButtonUp
(
0
))
{
Destroy
(
tempDrag
);
}
}
}
Assets/SelectArea.cs.meta
0 → 100644
View file @
9aec2d93
fileFormatVersion: 2
guid: 4cac6e9f5a929c3459ede6049a34ff3b
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