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
81b44dfa
Commit
81b44dfa
authored
Jul 02, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
서류 가방이 이제 총알을 지님
parent
71c15b22
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
6 deletions
+5
-6
Briefcase.cs
Assets/Scripts/Interactors/Briefcase.cs
+1
-1
MapManager.cs
Assets/Scripts/Managers/MapManager.cs
+1
-1
Player.cs
Assets/Scripts/Player.cs
+1
-0
PlayerController.cs
Assets/Scripts/PlayerController.cs
+2
-4
No files found.
Assets/Scripts/Interactors/Briefcase.cs
View file @
81b44dfa
...
...
@@ -35,7 +35,7 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
public
void
Interact
(
Vector2Int
position
)
{
Debug
.
Log
(
Position
+
" "
+
position
);
PlayerController
.
inst
.
bulletList
.
Add
(
dropBullet
);
PlayerController
.
inst
.
AddBullet
(
dropBullet
);
if
(
Position
==
position
)
{
if
(
GameManager
.
aCase
>=
0
)
...
...
Assets/Scripts/Managers/MapManager.cs
View file @
81b44dfa
...
...
@@ -81,7 +81,7 @@ public class MapManager : SingletonBehaviour<MapManager>
for
(
int
i
=
0
;
i
<
currentMap
.
startFloors
.
Count
;
i
++)
PlayerController
.
inst
.
CreatePlayer
(
currentMap
.
startFloors
[
i
]);
for
(
int
i
=
0
;
i
<
loadedMapData
.
bullets
.
Count
;
i
++)
PlayerController
.
inst
.
bulletList
.
Add
(
loadedMapData
.
bullets
[
i
]);
PlayerController
.
inst
.
AddBullet
(
loadedMapData
.
bullets
[
i
]);
}
public
IEnumerator
Rebaker
()
{
...
...
Assets/Scripts/Player.cs
View file @
81b44dfa
...
...
@@ -106,6 +106,7 @@ public class Player : MonoBehaviour
newBullet
.
transform
.
position
=
shootingFinger
.
transform
.
position
;
newBullet
.
transform
.
LookAt
(
shootingArm
.
transform
.
forward
+
newBullet
.
transform
.
position
);
newBullet
.
Init
(
shootingArm
.
transform
.
forward
);
PlayerController
.
inst
.
bulletList
.
RemoveAt
(
0
);
}
private
void
OnTriggerEnter
(
Collider
other
)
...
...
Assets/Scripts/PlayerController.cs
View file @
81b44dfa
...
...
@@ -9,7 +9,6 @@ public class PlayerController : SingletonBehaviour<PlayerController>
public
Player
currentPlayer
;
public
bool
isPlayerMoving
,
isPlayerShooting
,
isZooming
;
public
List
<
BulletCode
>
bulletList
=
new
List
<
BulletCode
>();
private
int
bulletCount
=
0
;
private
Vector2Int
prePos
;
public
Vector2Int
MapPos
{
...
...
@@ -120,7 +119,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
//For test
public
string
GetCurrentBullet
()
{
return
bulletList
.
Count
>
0
?
bulletList
[
bulletCount
].
ToString
()
:
null
;
return
bulletList
.
Count
>
0
?
bulletList
[
0
].
ToString
()
:
null
;
}
// Start is called before the first frame update
...
...
@@ -174,8 +173,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
{
if
(
bulletList
.
Count
>
0
)
{
currentPlayer
.
Shoot
(
bulletList
[
bulletCount
]);
bulletList
.
RemoveAt
(
bulletCount
);
currentPlayer
.
Shoot
(
bulletList
[
0
]);
}
}
}
...
...
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