Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WidowmakerSimulator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
15박보승
WidowmakerSimulator
Commits
df67be5d
Commit
df67be5d
authored
5 years ago
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
플레이어 높이를 보여주는 UI 추가
parent
0e4daf51
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
11 deletions
+100
-11
SampleScene.unity
Grapplers/Assets/Scenes/SampleScene.unity
+89
-8
IngameUIManager.cs
Grapplers/Assets/Scripts/IngameUIManager.cs
+9
-2
PlayerController.cs
Grapplers/Assets/Scripts/PlayerController.cs
+2
-1
No files found.
Grapplers/Assets/Scenes/SampleScene.unity
View file @
df67be5d
...
...
@@ -704,6 +704,85 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330379322}
m_CullTransparentMesh: 0
--- !u!1 &369112310
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 369112311}
- component: {fileID: 369112313}
- component: {fileID: 369112312}
m_Layer: 5
m_Name: HeightText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &369112311
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 369112310}
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: 413298776}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &369112312
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 369112310}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
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_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 0 M
--- !u!222 &369112313
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 369112310}
m_CullTransparentMesh: 0
--- !u!1 &398288500
GameObject:
m_ObjectHideFlags: 0
...
...
@@ -922,6 +1001,7 @@ RectTransform:
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 330379323}
- {fileID: 369112311}
m_Father: {fileID: 0}
m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
...
...
@@ -944,6 +1024,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
targetLockedUIPrefab: {fileID: 5037612186728958095, guid: 04d7a8bd5b7afea418585e2d9e55c109,
type: 3}
heightText: {fileID: 369112312}
--- !u!1 &519663054
GameObject:
m_ObjectHideFlags: 0
...
...
@@ -1963,7 +2044,7 @@ ParticleSystemRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 1030
8
, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 1030
6
, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 0}
m_StaticBatchInfo:
firstSubMesh: 0
...
...
@@ -2091,7 +2172,7 @@ ParticleSystem:
startLifetime:
serializedVersion: 2
minMaxState: 0
scalar: 0.
5
scalar: 0.
1
minScalar: 5
maxCurve:
serializedVersion: 2
...
...
@@ -2144,7 +2225,7 @@ ParticleSystem:
startSpeed:
serializedVersion: 2
minMaxState: 0
scalar:
1
00
scalar:
5
00
minScalar: 5
maxCurve:
serializedVersion: 2
...
...
@@ -2259,9 +2340,9 @@ ParticleSystem:
m_NumAlphaKeys: 2
startSize:
serializedVersion: 2
minMaxState:
0
scalar: 1
minScalar:
1
minMaxState:
3
scalar:
0.
1
minScalar:
0.5
maxCurve:
serializedVersion: 2
m_Curve:
...
...
@@ -2312,7 +2393,7 @@ ParticleSystem:
m_RotationOrder: 4
startSizeY:
serializedVersion: 2
minMaxState:
0
minMaxState:
3
scalar: 1
minScalar: 1
maxCurve:
...
...
@@ -2365,7 +2446,7 @@ ParticleSystem:
m_RotationOrder: 4
startSizeZ:
serializedVersion: 2
minMaxState:
0
minMaxState:
3
scalar: 1
minScalar: 1
maxCurve:
...
...
This diff is collapsed.
Click to expand it.
Grapplers/Assets/Scripts/IngameUIManager.cs
View file @
df67be5d
...
...
@@ -7,9 +7,11 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
{
[
SerializeField
]
private
GameObject
targetLockedUIPrefab
;
private
List
<
Image
>
targetLockedUIs
=
new
List
<
Image
>();
[
SerializeField
]
private
Text
heightText
;
public
void
UpdateTargetLockedUIs
(
Vector3
[]
pos
)
{
int
tmp
,
i
=
0
;
...
...
@@ -37,4 +39,9 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
targetLockedUIs
.
RemoveRange
(
tmp
,
targetLockedUIs
.
Count
-
tmp
);
}
}
public
void
UpdateHeightText
(
float
height
)
{
heightText
.
text
=
string
.
Format
(
"{0:F1}"
,
height
)
+
" M"
;
}
}
This diff is collapsed.
Click to expand it.
Grapplers/Assets/Scripts/PlayerController.cs
View file @
df67be5d
...
...
@@ -63,6 +63,7 @@ public class PlayerController : MonoBehaviour
float
vertical
=
Input
.
GetAxis
(
"Vertical"
);
float
horizontal
=
Input
.
GetAxis
(
"Horizontal"
);
Ray
ray
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
RaycastHit
[]
enemyHits
=
Physics
.
SphereCastAll
(
ray
,
3
,
50
,
enemyMask
);
Vector3
[]
positions
=
new
Vector3
[
enemyHits
.
Length
];
...
...
@@ -108,7 +109,7 @@ public class PlayerController : MonoBehaviour
private
void
LateUpdate
()
{
IngameUIManager
.
inst
.
UpdateHeightText
(
transform
.
position
.
y
);
}
private
void
FireHook
()
...
...
This diff is collapsed.
Click to expand it.
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