Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Suck It
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GameDevWeek
W
Wintersemester 2018-2019
Unity
Suck It
Commits
6ae6834b
Commit
6ae6834b
authored
Mar 28, 2019
by
Sebastian Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup
parent
4252cd21
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
155 additions
and
5 deletions
+155
-5
Assets/_Game/Scenes/Pick_Up_Test_Scene.unity
Assets/_Game/Scenes/Pick_Up_Test_Scene.unity
+142
-0
Assets/_Game/Scripts/Elements/SliderObject.cs
Assets/_Game/Scripts/Elements/SliderObject.cs
+4
-4
Assets/_Game/Scripts/Interaction.meta
Assets/_Game/Scripts/Interaction.meta
+8
-0
Assets/_Game/Scripts/Player/MovementController.cs
Assets/_Game/Scripts/Player/MovementController.cs
+1
-1
No files found.
Assets/_Game/Scenes/Pick_Up_Test_Scene.unity
View file @
6ae6834b
...
...
@@ -628,6 +628,148 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
4512b8eb550115443bbba2ecd59a960c
,
type
:
3
}
---
!u!1
&1644657071
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1644657076
}
-
component
:
{
fileID
:
1644657075
}
-
component
:
{
fileID
:
1644657073
}
-
component
:
{
fileID
:
1644657072
}
-
component
:
{
fileID
:
1644657074
}
m_Layer
:
0
m_Name
:
Obstacle
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!114
&1644657072
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1644657071
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
d5c135c3fe901cf4696abeebd2ac1f28
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
force
:
1
---
!u!61
&1644657073
BoxCollider2D
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1644657071
}
m_Enabled
:
1
m_Density
:
1
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_UsedByEffector
:
0
m_UsedByComposite
:
0
m_Offset
:
{
x
:
0
,
y
:
0
}
m_SpriteTilingProperty
:
border
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
0
}
pivot
:
{
x
:
0.5
,
y
:
0.5
}
oldSize
:
{
x
:
1
,
y
:
1
}
newSize
:
{
x
:
1
,
y
:
1
}
adaptiveTilingThreshold
:
0.5
drawMode
:
0
adaptiveTiling
:
0
m_AutoTiling
:
0
serializedVersion
:
2
m_Size
:
{
x
:
1
,
y
:
1
}
m_EdgeRadius
:
0
---
!u!50
&1644657074
Rigidbody2D
:
serializedVersion
:
4
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1644657071
}
m_BodyType
:
0
m_Simulated
:
1
m_UseFullKinematicContacts
:
0
m_UseAutoMass
:
0
m_Mass
:
1
m_LinearDrag
:
0
m_AngularDrag
:
0.05
m_GravityScale
:
1
m_Material
:
{
fileID
:
0
}
m_Interpolate
:
0
m_SleepingMode
:
1
m_CollisionDetection
:
0
m_Constraints
:
0
---
!u!212
&1644657075
SpriteRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1644657071
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
10754
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
0
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
m_Sprite
:
{
fileID
:
21300000
,
guid
:
d0325f4b5843676408fd1f628635d218
,
type
:
3
}
m_Color
:
{
r
:
0.41509432
,
g
:
0.108125485
,
b
:
0.06852971
,
a
:
1
}
m_FlipX
:
0
m_FlipY
:
0
m_DrawMode
:
0
m_Size
:
{
x
:
1
,
y
:
1
}
m_AdaptiveModeThreshold
:
0.5
m_SpriteTileMode
:
0
m_WasSpriteAssigned
:
1
m_MaskInteraction
:
0
m_SpriteSortPoint
:
0
---
!u!4
&1644657076
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1644657071
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
3
,
y
:
1
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
8
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&1685552533
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/_Game/Scripts/Elements/SliderObject.cs
View file @
6ae6834b
...
...
@@ -29,19 +29,19 @@ public class SliderObject : MonoBehaviour
}
}*/
private
void
OnCollisionEnter
(
Collision
other
)
private
void
OnCollisionEnter
2D
(
Collision2D
other
)
{
if
(
other
.
transform
.
gameObject
.
tag
.
Equals
(
"Water"
))
{
gameObject
.
transform
.
SetParent
(
other
.
transform
)
;
gameObject
.
GetComponent
<
Rigidbody2D
>().
velocity
=
other
.
gameObject
.
GetComponent
<
Rigidbody2D
>().
velocity
;
}
}
private
void
OnCollisionExit
(
Collision
other
)
private
void
OnCollisionExit
2D
(
Collision2D
other
)
{
if
(
other
.
transform
.
gameObject
.
tag
.
Equals
(
"Water"
))
{
gameObject
.
transform
.
SetParent
(
null
)
;
gameObject
.
GetComponent
<
Rigidbody2D
>().
velocity
=
Vector2
.
zero
;
}
}
}
Assets/_Game/Scripts/Interaction.meta
0 → 100644
View file @
6ae6834b
fileFormatVersion: 2
guid: 5782222d4c9b9424ea96676650e643a8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Scripts/Player/MovementController.cs
View file @
6ae6834b
...
...
@@ -105,7 +105,7 @@ public class MovementController : MonoBehaviour
public
void
Move
(
Vector2
move
,
bool
jump
)
{
Debug
.
Log
(
m_Swimming
);
//
Debug.Log(m_Swimming);
//only control the player if grounded or airControl is turned on
if
(
m_Grounded
||
m_AirControl
||
m_Swimming
)
{
...
...
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