Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Manuel Buss
gdw-git-workshop3-2019.2
Commits
b9c99dce
Commit
b9c99dce
authored
Sep 10, 2019
by
Simon Hetzer
Browse files
spawnhight data removed, float value added
parent
f384bfc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Assets/_Game/Data/SpawnHight.asset
deleted
100644 → 0
View file @
f384bfc8
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!114
&11400000
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
0
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
92e1008df43e3cc4295e764d804d086a
,
type
:
3
}
m_Name
:
SpawnHight
m_EditorClassIdentifier
:
value
:
5
initValue
:
0
Assets/_Game/Data/SpawnHight.asset.meta
deleted
100644 → 0
View file @
f384bfc8
fileFormatVersion: 2
guid: b41110fc745a592449a779c29c1378b5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Scripts/Score.cs
View file @
b9c99dce
...
...
@@ -11,7 +11,7 @@ public class Score : MonoBehaviour
[
SerializeField
]
private
Transform
playerLeft
;
[
SerializeField
]
private
Transform
playerRight
;
[
SerializeField
]
private
IntValue
spawnHight
;
[
SerializeField
]
private
float
spawnHight
;
private
void
Start
()
{
...
...
@@ -26,12 +26,12 @@ public class Score : MonoBehaviour
if
(
other
.
transform
.
position
.
x
<
0
)
{
rightValue
.
value
++;
other
.
transform
.
position
=
playerRight
.
position
+
new
Vector3
(
0
,
5
,
0
);
other
.
transform
.
position
=
playerRight
.
position
+
new
Vector3
(
0
,
spawnHight
,
0
);
}
else
{
leftValue
.
value
++;
other
.
transform
.
position
=
playerLeft
.
position
+
new
Vector3
(
0
,
5
,
0
);
other
.
transform
.
position
=
playerLeft
.
position
+
new
Vector3
(
0
,
spawnHight
,
0
);
}
other
.
gameObject
.
GetComponent
<
Rigidbody2D
>().
velocity
=
Vector2
.
zero
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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