Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
curvedflats
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
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
Flatland
curvedflats
Commits
f55c4315
Commit
f55c4315
authored
Aug 16, 2019
by
16이진형
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
상호작용을 위한 리팩토링
parent
8299a897
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
195 additions
and
7 deletions
+195
-7
.gitignore
.gitignore
+3
-1
Test.unity
Assets/Scenes/Test.unity
+2
-2
ExtrudedMesh.cs
Assets/Scripts/ExtrudedMesh.cs
+2
-2
FlatlandMovement.cs
Assets/Scripts/FlatlandMovement.cs
+5
-0
GrabableObject.cs
Assets/Scripts/GrabableObject.cs
+20
-0
GrabableObject.cs.meta
Assets/Scripts/GrabableObject.cs.meta
+11
-0
InteractiveObject.cs
Assets/Scripts/InteractiveObject.cs
+20
-0
InteractiveObject.cs.meta
Assets/Scripts/InteractiveObject.cs.meta
+11
-0
Interface.meta
Assets/Scripts/Interface.meta
+8
-0
IInteractable.cs
Assets/Scripts/Interface/IInteractable.cs
+15
-0
IInteractable.cs.meta
Assets/Scripts/Interface/IInteractable.cs.meta
+11
-0
IInteractor.cs
Assets/Scripts/Interface/IInteractor.cs
+13
-0
IInteractor.cs.meta
Assets/Scripts/Interface/IInteractor.cs.meta
+11
-0
Planemovement.cs
Assets/Scripts/Planemovement.cs
+1
-1
PlayerMovement.cs
Assets/Scripts/PlayerMovement.cs
+22
-1
aaa.cs
Assets/Scripts/aaa.cs
+18
-0
aaa.cs.meta
Assets/Scripts/aaa.cs.meta
+11
-0
Packages-Update.log
Logs/Packages-Update.log
+9
-0
manifest.json
Packages/manifest.json
+2
-0
No files found.
.gitignore
View file @
f55c4315
...
...
@@ -68,4 +68,6 @@ GraphicsSettings.asset
ProjectSettings.asset
ProjectVersion.txt
\ No newline at end of file
ProjectVersion.txt
.vs/
\ No newline at end of file
Assets/Scenes/Test.unity
View file @
f55c4315
...
...
@@ -1021,7 +1021,7 @@ MonoBehaviour:
time
:
0
theobject
:
{
fileID
:
439858915
}
starttime
:
10
otherclock
:
{
fileID
:
1094934749
}
otherclock
:
{
fileID
:
0
}
---
!u!4
&535323109
Transform
:
m_ObjectHideFlags
:
0
...
...
@@ -2557,7 +2557,7 @@ MonoBehaviour:
m_GameObject
:
{
fileID
:
1094934748
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
0bf826b8a4774ba4b9c6a1cff6925667
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
36bd4b20d3bc814459c577f508eda20c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
beta
:
0
...
...
Assets/Scripts/ExtrudedMesh.cs
View file @
f55c4315
...
...
@@ -169,10 +169,10 @@ public class ExtrudedMesh : MonoBehaviour
public
void
OnCollisionStay
(
Collision
collision
)
{
if
(
transform
.
parent
.
GetComponent
(
typeof
(
Planem
ovement
))
==
null
)
if
(
transform
.
parent
.
GetComponent
(
typeof
(
FlatlandM
ovement
))
==
null
)
return
;
else
transform
.
parent
.
GetComponent
<
Planem
ovement
>().
OnCollisionStaychild
(
collision
);
transform
.
parent
.
GetComponent
<
FlatlandM
ovement
>().
OnCollisionStaychild
(
collision
);
}
}
Assets/Scripts/FlatlandMovement.cs
View file @
f55c4315
...
...
@@ -252,4 +252,9 @@ public class FlatlandMovement : MonoBehaviour
pathVelocitys
.
Enqueue
(
vel
);
}
}
public
virtual
void
OnCollisionStaychild
(
Collision
collision
)
{
}
}
Assets/Scripts/GrabableObject.cs
0 → 100644
View file @
f55c4315
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
Assets.Scripts.Interface
;
public
class
GrabableObject
:
InteractiveObject
{
public
override
string
InteractType
{
get
{
return
"grab"
;
}
}
public
override
void
OnInteract
()
{
return
;
}
}
Assets/Scripts/GrabableObject.cs.meta
0 → 100644
View file @
f55c4315
fileFormatVersion: 2
guid: 36bd4b20d3bc814459c577f508eda20c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/InteractiveObject.cs
0 → 100644
View file @
f55c4315
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
Assets.Scripts.Interface
;
public
abstract
class
InteractiveObject
:
Planemovement
,
IInteractable
{
public
virtual
string
InteractType
{
get
{
return
"grab"
;
}
}
public
virtual
void
OnInteract
()
{
return
;
}
}
Assets/Scripts/InteractiveObject.cs.meta
0 → 100644
View file @
f55c4315
fileFormatVersion: 2
guid: c42ab80a332764446b31c16302ad8201
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Interface.meta
0 → 100644
View file @
f55c4315
fileFormatVersion: 2
guid: 34e3ac463940bf448abef30831bed1aa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Interface/IInteractable.cs
0 → 100644
View file @
f55c4315
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Assets.Scripts.Interface
{
interface
IInteractable
{
void
OnInteract
();
string
InteractType
{
get
;
}
}
}
Assets/Scripts/Interface/IInteractable.cs.meta
0 → 100644
View file @
f55c4315
fileFormatVersion: 2
guid: 0542cb93a4e6c4d4187b17db5d9a0faa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Interface/IInteractor.cs
0 → 100644
View file @
f55c4315
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Assets.Scripts.Interface
{
interface
IInteractor
{
void
OnInteract
();
}
}
Assets/Scripts/Interface/IInteractor.cs.meta
0 → 100644
View file @
f55c4315
fileFormatVersion: 2
guid: 7b2adb4c50930bb4cafa449133a2174c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Planemovement.cs
View file @
f55c4315
...
...
@@ -139,7 +139,7 @@ public class Planemovement : FlatlandMovement
time
+=
Time
.
fixedDeltaTime
*
(
float
)(
levelManager
.
player
.
gamma
/
gamma
);
}
public
void
OnCollisionStaychild
(
Collision
collision
)
public
override
void
OnCollisionStaychild
(
Collision
collision
)
{
//Debug.Log("hit!");
//if(collision.transform.parent.name != "AnObject(Clone)")
...
...
Assets/Scripts/PlayerMovement.cs
View file @
f55c4315
...
...
@@ -3,8 +3,9 @@ using System.Collections.Generic;
using
UnityEngine
;
using
MathNet.Numerics.LinearAlgebra
;
using
MathNet.Numerics.LinearAlgebra.Double
;
using
Assets.Scripts.Interface
;
public
class
PlayerMovement
:
FlatlandMovement
public
class
PlayerMovement
:
FlatlandMovement
,
IInteractor
{
bool
isinertial
=
true
;
...
...
@@ -138,4 +139,24 @@ public class PlayerMovement : FlatlandMovement
{
return
isinertial
;
}
public
void
OnInteract
()
{
return
;
}
public
override
void
OnCollisionStaychild
(
Collision
collision
)
{
if
(
collision
.
transform
.
parent
!=
null
)
{
Debug
.
Log
(
"Collision"
);
var
x
=
collision
.
transform
.
parent
.
gameObject
.
GetComponent
<
InteractiveObject
>();
if
(
x
)
{
//상호작용가능한 물건일때
Debug
.
Log
(
x
.
InteractType
);
}
}
}
}
Assets/Scripts/aaa.cs
0 → 100644
View file @
f55c4315
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
aaa
:
MonoBehaviour
{
// Start is called before the first frame update
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
}
Assets/Scripts/aaa.cs.meta
0 → 100644
View file @
f55c4315
fileFormatVersion: 2
guid: c80a1e773f2174541b462e30fe5ae465
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Logs/Packages-Update.log
View file @
f55c4315
...
...
@@ -16,3 +16,12 @@ The following packages were added:
The following packages were updated:
com.unity.package-manager-ui from version 2.1.2 to 2.2.0
com.unity.timeline from version 1.0.0 to 1.1.0
=== Fri Aug 16 13:33:29 2019
Packages were changed.
Update Mode: updateDependencies
The following packages were added:
com.unity.multiplayer-hlapi@1.0.2
com.unity.xr.legacyinputhelpers@2.0.2
Packages/manifest.json
View file @
f55c4315
...
...
@@ -8,12 +8,14 @@
"com.unity.ext.nunit"
:
"1.0.0"
,
"com.unity.ide.rider"
:
"1.0.8"
,
"com.unity.ide.vscode"
:
"1.0.7"
,
"com.unity.multiplayer-hlapi"
:
"1.0.2"
,
"com.unity.package-manager-ui"
:
"2.2.0"
,
"com.unity.purchasing"
:
"2.0.6"
,
"com.unity.test-framework"
:
"1.0.13"
,
"com.unity.textmeshpro"
:
"2.0.1"
,
"com.unity.timeline"
:
"1.1.0"
,
"com.unity.ugui"
:
"1.0.0"
,
"com.unity.xr.legacyinputhelpers"
:
"2.0.2"
,
"com.unity.modules.ai"
:
"1.0.0"
,
"com.unity.modules.androidjni"
:
"1.0.0"
,
"com.unity.modules.animation"
:
"1.0.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