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
fdb3878c
Commit
fdb3878c
authored
Apr 06, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
마네킹 로직 변경
parent
10d469af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
Mannequin.cs
Assets/Scripts/Interactors/Mannequin.cs
+22
-5
No files found.
Assets/Scripts/Interactors/Mannequin.cs
View file @
fdb3878c
...
...
@@ -4,14 +4,31 @@ using UnityEngine;
public
class
Mannequin
:
MonoBehaviour
,
IBulletInteractor
{
[
SerializeField
]
private
Mesh
[]
mannequinMesh
=
new
Mesh
[
2
];
private
Color
_color
;
public
Color
Color
{
get
{
return
GetComponent
<
MeshRenderer
>().
material
.
color
;
return
_
color
;
}
private
set
{
GetComponent
<
MeshRenderer
>().
material
.
color
=
value
;
if
(
value
==
Color
.
black
)
{
GetComponent
<
MeshFilter
>().
mesh
=
mannequinMesh
[
0
];
//Change mesh to black mannequin
}
else
if
(
value
==
Color
.
white
)
{
GetComponent
<
MeshFilter
>().
mesh
=
mannequinMesh
[
1
];
//Change mesh to white mannequin
}
else
{
Debug
.
LogWarning
(
"Invalid color input"
);
}
_color
=
value
;
}
}
...
...
@@ -19,11 +36,11 @@ public class Mannequin : MonoBehaviour, IBulletInteractor
{
if
(
bullet
is
TruthBullet
)
{
GetComponent
<
MeshRenderer
>().
material
.
c
olor
=
Color
.
white
;
C
olor
=
Color
.
white
;
}
if
(
bullet
is
FakeBullet
)
{
GetComponent
<
MeshRenderer
>().
material
.
c
olor
=
Color
.
black
;
C
olor
=
Color
.
black
;
}
}
...
...
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