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
86e9e440
Commit
86e9e440
authored
Apr 04, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPlayerInteract 관련 작업중
parent
7bfd0710
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
837 additions
and
26 deletions
+837
-26
SampleScene.unity
Assets/Scenes/BSDummy/SampleScene.unity
+706
-0
SampleScene.unity.meta
Assets/Scenes/BSDummy/SampleScene.unity.meta
+7
-0
TruthBullet.cs
Assets/Scripts/Bullets/TruthBullet.cs
+2
-2
CameraTurret.cs
Assets/Scripts/Interactors/CameraTurret.cs
+13
-1
IInteractor.cs
Assets/Scripts/Interactors/Interfaces/IInteractor.cs
+6
-1
Mannequin.cs
Assets/Scripts/Interactors/Mannequin.cs
+1
-1
Mirror.cs
Assets/Scripts/Interactors/Mirror.cs
+1
-1
NormalWall.cs
Assets/Scripts/Interactors/NormalWall.cs
+1
-1
Managers.meta
Assets/Scripts/Managers.meta
+1
-1
GameManager.cs
Assets/Scripts/Managers/GameManager.cs
+14
-0
GameManager.cs.meta
Assets/Scripts/Managers/GameManager.cs.meta
+11
-0
PlayerController.cs
Assets/Scripts/PlayerController.cs
+30
-3
QualitySettings.asset
ProjectSettings/QualitySettings.asset
+43
-14
UnityConnectSettings.asset
ProjectSettings/UnityConnectSettings.asset
+1
-1
No files found.
Assets/Scenes/BSDummy/SampleScene.unity
0 → 100644
View file @
86e9e440
This diff is collapsed.
Click to expand it.
Assets/Scenes/BSDummy/SampleScene.unity.meta
0 → 100644
View file @
86e9e440
fileFormatVersion: 2
guid: 5a6ac0928b41cf64ea0e67fc9218e39b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Bullets/TruthBullet.cs
View file @
86e9e440
...
...
@@ -10,9 +10,9 @@ public class TruthBullet : Bullet
{
other
.
GetComponent
<
IBreakable
>().
Break
();
}
else
if
(
other
.
GetComponent
<
IInteractor
>()
!=
null
)
else
if
(
other
.
GetComponent
<
I
Bullet
Interactor
>()
!=
null
)
{
other
.
GetComponent
<
IInteractor
>().
Interact
(
this
);
other
.
GetComponent
<
I
Bullet
Interactor
>().
Interact
(
this
);
}
Destroy
(
gameObject
);
}
...
...
Assets/Scripts/Interactors/CameraTurret.cs
View file @
86e9e440
...
...
@@ -2,10 +2,22 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
CameraTurret
:
MonoBehaviour
,
IBreakable
public
class
CameraTurret
:
MonoBehaviour
,
IBreakable
,
IPlayerInteractor
{
private
Vector2Int
position
;
public
void
Init
(
Vector2Int
pos
)
{
position
=
pos
;
}
public
void
Break
()
{
Destroy
(
gameObject
);
}
public
void
Interact
(
Vector2Int
pos
)
{
}
}
Assets/Scripts/Interactors/Interfaces/IInteractor.cs
View file @
86e9e440
...
...
@@ -2,7 +2,12 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
interface
IInteractor
public
interface
I
Bullet
Interactor
{
void
Interact
(
Bullet
bullet
);
}
public
interface
IPlayerInteractor
{
void
Interact
(
Vector2Int
position
);
}
\ No newline at end of file
Assets/Scripts/Interactors/Mannequin.cs
View file @
86e9e440
...
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
Mannequin
:
MonoBehaviour
,
IInteractor
public
class
Mannequin
:
MonoBehaviour
,
I
Bullet
Interactor
{
public
Color
Color
{
get
...
...
Assets/Scripts/Interactors/Mirror.cs
View file @
86e9e440
...
...
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using
UnityEngine
;
using
UnityEngine.AI
;
public
class
Mirror
:
MonoBehaviour
,
IInteractor
,
IBreakable
public
class
Mirror
:
MonoBehaviour
,
I
Bullet
Interactor
,
IBreakable
{
private
Camera
camera
;
private
RenderTexture
rt
;
...
...
Assets/Scripts/Interactors/NormalWall.cs
View file @
86e9e440
...
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
NormalWall
:
MonoBehaviour
,
IInteractor
public
class
NormalWall
:
MonoBehaviour
,
I
Bullet
Interactor
{
public
void
Interact
(
Bullet
bullet
)
{
...
...
Assets/
Data
.meta
→
Assets/
Scripts/Managers
.meta
View file @
86e9e440
fileFormatVersion: 2
guid:
f6226b2548447a54486acfc694a44e4d
guid:
e31b766c78dd4084ea268dce5ba8df43
folderAsset: yes
DefaultImporter:
externalObjects: {}
...
...
Assets/Scripts/Managers/GameManager.cs
0 → 100644
View file @
86e9e440
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
System.Linq
;
public
class
GameManager
:
SingletonBehaviour
<
GameManager
>
{
private
List
<
IPlayerInteractor
>
playerInteractors
;
public
void
UpdateInteractorList
()
{
playerInteractors
=
FindObjectsOfType
<
MonoBehaviour
>().
OfType
<
IPlayerInteractor
>().
ToList
();
}
}
Assets/Scripts/Managers/GameManager.cs.meta
0 → 100644
View file @
86e9e440
fileFormatVersion: 2
guid: f94477ce50cfef746baa12d77bb9d4eb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/PlayerController.cs
View file @
86e9e440
...
...
@@ -5,15 +5,32 @@ using UnityEngine.AI;
public
class
PlayerController
:
MonoBehaviour
{
private
Vector2Int
prePos
;
public
Vector2Int
MapPos
{
get
{
Vector2Int
pos
=
Vector2Int
.
zero
;
pos
.
x
=
Mathf
.
RoundToInt
(
transform
.
position
.
x
);
pos
.
y
=
Mathf
.
RoundToInt
(
transform
.
position
.
y
);
return
pos
;
}
}
// Start is called before the first frame update
void
Start
()
{
prePos
=
MapPos
;
}
// Update is called once per frame
void
Update
()
{
if
(
prePos
!=
MapPos
)
{
}
if
(
Input
.
GetMouseButtonDown
(
0
))
{
Ray
mouseRay
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
...
...
@@ -21,9 +38,19 @@ public class PlayerController : MonoBehaviour
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"floor"
))
{
GetComponent
<
NavMeshAgent
>().
SetDestination
(
hit
.
collider
.
gameObject
.
transform
.
position
);
Debug
.
Log
(
hit
.
collider
.
gameObject
.
GetComponent
<
Floor
>().
mapPos
);
Debug
.
Log
(
hit
.
collider
.
gameObject
.
tag
);
//
Debug.Log(hit.collider.gameObject.GetComponent<Floor>().mapPos);
//
Debug.Log(hit.collider.gameObject.tag);
}
}
}
private
void
OnCollisionEnter
(
Collision
collision
)
{
Debug
.
Log
(
collision
.
gameObject
.
name
);
Floor
floor
=
collision
.
transform
.
GetComponent
<
Floor
>();
if
(
floor
!=
null
)
{
Debug
.
Log
(
floor
.
mapPos
);
}
}
}
ProjectSettings/QualitySettings.asset
View file @
86e9e440
...
...
@@ -29,9 +29,16 @@ QualitySettings:
vSyncCount
:
0
lodBias
:
0.3
maximumLODLevel
:
0
streamingMipmapsActive
:
0
streamingMipmapsAddAllCameras
:
1
streamingMipmapsMemoryBudget
:
512
streamingMipmapsRenderersPerFrame
:
512
streamingMipmapsMaxLevelReduction
:
2
streamingMipmapsMaxFileIORequests
:
1024
particleRaycastBudget
:
4
asyncUploadTimeSlice
:
2
asyncUploadBufferSize
:
16
asyncUploadPersistentBuffer
:
1
resolutionScalingFixedDPIFactor
:
1
excludedTargetPlatforms
:
[]
-
serializedVersion
:
2
...
...
@@ -57,9 +64,16 @@ QualitySettings:
vSyncCount
:
0
lodBias
:
0.4
maximumLODLevel
:
0
streamingMipmapsActive
:
0
streamingMipmapsAddAllCameras
:
1
streamingMipmapsMemoryBudget
:
512
streamingMipmapsRenderersPerFrame
:
512
streamingMipmapsMaxLevelReduction
:
2
streamingMipmapsMaxFileIORequests
:
1024
particleRaycastBudget
:
16
asyncUploadTimeSlice
:
2
asyncUploadBufferSize
:
16
asyncUploadPersistentBuffer
:
1
resolutionScalingFixedDPIFactor
:
1
excludedTargetPlatforms
:
[]
-
serializedVersion
:
2
...
...
@@ -85,9 +99,16 @@ QualitySettings:
vSyncCount
:
1
lodBias
:
0.7
maximumLODLevel
:
0
streamingMipmapsActive
:
0
streamingMipmapsAddAllCameras
:
1
streamingMipmapsMemoryBudget
:
512
streamingMipmapsRenderersPerFrame
:
512
streamingMipmapsMaxLevelReduction
:
2
streamingMipmapsMaxFileIORequests
:
1024
particleRaycastBudget
:
64
asyncUploadTimeSlice
:
2
asyncUploadBufferSize
:
16
asyncUploadPersistentBuffer
:
1
resolutionScalingFixedDPIFactor
:
1
excludedTargetPlatforms
:
[]
-
serializedVersion
:
2
...
...
@@ -113,9 +134,16 @@ QualitySettings:
vSyncCount
:
1
lodBias
:
1
maximumLODLevel
:
0
streamingMipmapsActive
:
0
streamingMipmapsAddAllCameras
:
1
streamingMipmapsMemoryBudget
:
512
streamingMipmapsRenderersPerFrame
:
512
streamingMipmapsMaxLevelReduction
:
2
streamingMipmapsMaxFileIORequests
:
1024
particleRaycastBudget
:
256
asyncUploadTimeSlice
:
2
asyncUploadBufferSize
:
16
asyncUploadPersistentBuffer
:
1
resolutionScalingFixedDPIFactor
:
1
excludedTargetPlatforms
:
[]
-
serializedVersion
:
2
...
...
@@ -141,9 +169,16 @@ QualitySettings:
vSyncCount
:
1
lodBias
:
1.5
maximumLODLevel
:
0
streamingMipmapsActive
:
0
streamingMipmapsAddAllCameras
:
1
streamingMipmapsMemoryBudget
:
512
streamingMipmapsRenderersPerFrame
:
512
streamingMipmapsMaxLevelReduction
:
2
streamingMipmapsMaxFileIORequests
:
1024
particleRaycastBudget
:
1024
asyncUploadTimeSlice
:
2
asyncUploadBufferSize
:
16
asyncUploadPersistentBuffer
:
1
resolutionScalingFixedDPIFactor
:
1
excludedTargetPlatforms
:
[]
-
serializedVersion
:
2
...
...
@@ -169,22 +204,16 @@ QualitySettings:
vSyncCount
:
1
lodBias
:
2
maximumLODLevel
:
0
streamingMipmapsActive
:
0
streamingMipmapsAddAllCameras
:
1
streamingMipmapsMemoryBudget
:
512
streamingMipmapsRenderersPerFrame
:
512
streamingMipmapsMaxLevelReduction
:
2
streamingMipmapsMaxFileIORequests
:
1024
particleRaycastBudget
:
4096
asyncUploadTimeSlice
:
2
asyncUploadBufferSize
:
16
asyncUploadPersistentBuffer
:
1
resolutionScalingFixedDPIFactor
:
1
excludedTargetPlatforms
:
[]
m_PerPlatformDefaultQuality
:
Android
:
2
Nintendo 3DS
:
5
Nintendo Switch
:
5
PS4
:
5
PSP2
:
2
Standalone
:
5
Tizen
:
2
WebGL
:
3
WiiU
:
5
Windows Store Apps
:
5
XboxOne
:
5
iPhone
:
2
tvOS
:
2
m_PerPlatformDefaultQuality
:
{}
ProjectSettings/UnityConnectSettings.asset
View file @
86e9e440
...
...
@@ -4,7 +4,7 @@
UnityConnectSettings
:
m_ObjectHideFlags
:
0
serializedVersion
:
1
m_Enabled
:
0
m_Enabled
:
1
m_TestMode
:
0
m_EventOldUrl
:
https://api.uca.cloud.unity3d.com/v1/events
m_EventUrl
:
https://cdp.cloud.unity3d.com/v1/events
...
...
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