Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
man-in-the-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
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
MIM
man-in-the-mirror
Commits
23a3f113
Commit
23a3f113
authored
5 years ago
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
이제 에임한데 위치쯤 갔는데도 안맞으면 강제로 트리거 발동하게 함
parent
d75e2966
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
379 additions
and
37 deletions
+379
-37
camera.prefab
Assets/Prefabs/Objects/camera.prefab
+6
-7
Stage Select.prefab
Assets/Prefabs/Stage Select.prefab
+349
-7
SelectStage.unity
Assets/Scenes/SelectStage.unity
+4
-16
Bullet.cs
Assets/Scripts/Bullets/Bullet.cs
+12
-2
CameraController.cs
Assets/Scripts/CameraController.cs
+2
-2
Player.cs
Assets/Scripts/Player.cs
+4
-2
StageSelector.cs
Assets/Scripts/StageSelector.cs
+2
-1
No files found.
Assets/Prefabs/Objects/camera.prefab
View file @
23a3f113
...
...
@@ -759,7 +759,7 @@ GameObject:
-
component
:
{
fileID
:
439939669
}
-
component
:
{
fileID
:
896145114
}
-
component
:
{
fileID
:
7514060783340336889
}
-
component
:
{
fileID
:
1
382926052388863002
}
-
component
:
{
fileID
:
1
747759991329878593
}
m_Layer
:
0
m_Name
:
camera
m_TagString
:
CameraTurret
...
...
@@ -842,8 +842,8 @@ NavMeshObstacle:
m_CarveOnlyStationary
:
1
m_Center
:
{
x
:
0
,
y
:
0.5
,
z
:
0
}
m_TimeToStationary
:
0.5
---
!u!13
6
&1382926052388863002
Capsul
eCollider
:
---
!u!13
5
&1747759991329878593
Spher
eCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
...
...
@@ -852,10 +852,9 @@ CapsuleCollider:
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
m_Radius
:
0.24
m_Height
:
0.7
m_Direction
:
1
m_Center
:
{
x
:
0
,
y
:
0.5
,
z
:
0
}
serializedVersion
:
2
m_Radius
:
0.23
m_Center
:
{
x
:
0
,
y
:
0.47
,
z
:
0
}
---
!u!1
&6001025753464815807
GameObject
:
m_ObjectHideFlags
:
0
...
...
This diff is collapsed.
Click to expand it.
Assets/Prefabs/Stage Select.prefab
View file @
23a3f113
This diff is collapsed.
Click to expand it.
Assets/Scenes/SelectStage.unity
View file @
23a3f113
...
...
@@ -542,25 +542,13 @@ PrefabInstance:
propertyPath
:
m_AnchorMax.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
209951667
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
m_Color.r
value
:
0.41509432
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
209951667
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
m_Color.g
value
:
0.41509432
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
209951667
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
m_Color.b
value
:
0.41509432
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
209951667
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
m_Color.a
value
:
0.8745098
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
12888245
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
707928317
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
0
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
This diff is collapsed.
Click to expand it.
Assets/Scripts/Bullets/Bullet.cs
View file @
23a3f113
...
...
@@ -17,10 +17,20 @@ public abstract class Bullet : MonoBehaviour
GameManager
.
inst
.
isBulletFlying
=
false
;
}
public
void
Init
(
Vector3
velocity
)
IEnumerator
ForceInteract
(
Collider
col
,
float
_time
)
{
yield
return
new
WaitForSeconds
(
_time
);
OnTriggerEnter
(
col
);
}
public
void
Init
(
Vector3
velocity
,
Collider
col
)
{
GameManager
.
inst
.
isBulletFlying
=
true
;
GetComponent
<
Rigidbody
>().
velocity
=
velocity
;
Destroy
(
gameObject
,
MapManager
.
inst
.
currentMap
.
maxMapSize
/
velocity
.
magnitude
);
float
flightTime
;
if
(
col
!=
null
)
flightTime
=
(
col
.
transform
.
position
-
transform
.
position
).
magnitude
/
velocity
.
magnitude
;
else
flightTime
=
MapManager
.
inst
.
currentMap
.
maxMapSize
/
velocity
.
magnitude
;
StartCoroutine
(
ForceInteract
(
col
,
flightTime
));
Destroy
(
gameObject
,
flightTime
+
0.5f
);
}
}
This diff is collapsed.
Click to expand it.
Assets/Scripts/CameraController.cs
View file @
23a3f113
...
...
@@ -91,7 +91,7 @@ public class CameraController : MonoBehaviour
for
(
i
=
0
;
i
<
cameraMoveDuration
;
i
+=
1
)
{
yield
return
new
WaitForSeconds
(
0.01f
);
if
(
Input
.
GetMouseButtonDown
(
0
))
if
(
Input
.
GetMouseButtonDown
(
0
)
||
!
StageSelector
.
inst
.
gameSettings
[
"zoomAnim"
]
)
break
;
transform
.
position
+=
posDiff
;
transform
.
eulerAngles
+=
new
Vector3
(
angleDiff
,
0
,
0
);
...
...
@@ -140,7 +140,7 @@ public class CameraController : MonoBehaviour
for
(
i
=
0
;
i
<
cameraMoveDuration
;
i
+=
1
)
{
yield
return
new
WaitForSeconds
(
0.01f
);
if
(
Input
.
GetMouseButtonDown
(
0
))
if
(
Input
.
GetMouseButtonDown
(
0
)
||
!
StageSelector
.
inst
.
gameSettings
[
"zoomAnim"
]
)
break
;
transform
.
position
+=
posDiff
;
transform
.
eulerAngles
+=
angleDiff
;
...
...
This diff is collapsed.
Click to expand it.
Assets/Scripts/Player.cs
View file @
23a3f113
...
...
@@ -25,9 +25,10 @@ public class Player : MonoBehaviour
public
VLight
aimLight
;
public
bool
canShoot
=
false
;
public
Collider
lastCol
=
null
;
private
Collider
beforeRay
=
null
;
private
GameObject
currentBullet
;
private
float
lastShoot
;
private
Collider
beforeRay
=
null
;
/// <summary>
/// Set this player as the current player.
...
...
@@ -153,7 +154,7 @@ public class Player : MonoBehaviour
Bullet
newBullet
=
MapManager
.
inst
.
bulletFactory
.
MakeBullet
(
bulletCode
);
newBullet
.
transform
.
position
=
shootingFinger
.
transform
.
position
;
newBullet
.
transform
.
LookAt
(
shootingArm
.
transform
.
forward
+
newBullet
.
transform
.
position
);
newBullet
.
Init
(
shootingArm
.
transform
.
forward
*
3
);
newBullet
.
Init
(
shootingArm
.
transform
.
forward
*
3
,
lastCol
);
currentBullet
=
newBullet
.
gameObject
;
PlayerController
.
inst
.
bulletList
.
RemoveAt
(
0
);
GameManager
.
inst
.
bulletUIGenerator
.
RemoveBulletUI
();
...
...
@@ -164,6 +165,7 @@ public class Player : MonoBehaviour
public
void
OffAllOutline
()
{
canShoot
=
false
;
if
(
beforeRay
!=
null
)
lastCol
=
beforeRay
;
laser
.
GetComponent
<
LineRenderer
>().
startColor
=
Color
.
red
;
laser
.
GetComponent
<
LineRenderer
>().
endColor
=
Color
.
red
;
if
(
beforeRay
!=
null
)
...
...
This diff is collapsed.
Click to expand it.
Assets/Scripts/StageSelector.cs
View file @
23a3f113
...
...
@@ -17,7 +17,8 @@ public class StageSelector : SingletonBehaviour<StageSelector>
public
Dictionary
<
string
,
bool
>
gameSettings
=
new
Dictionary
<
string
,
bool
>()
{
{
"postProcessing"
,
true
},
{
"sound"
,
true
}
{
"sound"
,
true
},
{
"zoomAnim"
,
true
}
};
[
Header
(
"맵 추가시 반드시 바꿔줘야하는 값.각 카테고리마다의 스테이지 수"
)]
...
...
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