Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Wintersemester 2018-2019
Unity
Suck It
Commits
4a85b43e
Commit
4a85b43e
authored
Mar 28, 2019
by
Sebastian
Browse files
Experiment für Animation der Wasser-Attacke
parent
4252cd21
Changes
70
Hide whitespace changes
Inline
Side-by-side
Assets/
_Game/
Prefabs/SavePoint.meta
→
Assets/Prefabs/SavePoint.meta
View file @
4a85b43e
File moved
Assets/
_Game/
Prefabs/SavePoint/SavePoint.prefab
→
Assets/Prefabs/SavePoint/SavePoint.prefab
View file @
4a85b43e
File moved
Assets/
_Game/
Prefabs/SavePoint/SavePoint.prefab.meta
→
Assets/Prefabs/SavePoint/SavePoint.prefab.meta
View file @
4a85b43e
File moved
Assets/
_Game/
Prefabs/SavePoint/StartPoint.prefab
→
Assets/Prefabs/SavePoint/StartPoint.prefab
View file @
4a85b43e
File moved
Assets/
_Game/
Prefabs/SavePoint/StartPoint.prefab.meta
→
Assets/Prefabs/SavePoint/StartPoint.prefab.meta
View file @
4a85b43e
File moved
Assets/_Game/Scenes/Pick_Up_Test_Scene.unity
View file @
4a85b43e
...
...
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity
:
1
m_CustomReflection
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
0
}
m_IndirectSpecularColor
:
{
r
:
0.180283
34
,
g
:
0.22571
328
,
b
:
0.30692
17
,
a
:
1
}
m_IndirectSpecularColor
:
{
r
:
0.180283
78
,
g
:
0.22571
412
,
b
:
0.30692
285
,
a
:
1
}
m_UseRadianceAmbientProbe
:
0
---
!u!157
&3
LightmapSettings
:
...
...
@@ -402,7 +402,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
392034771
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
1.2
5
,
y
:
-0.
2
5
,
z
:
0
}
m_LocalPosition
:
{
x
:
0.7
5
,
y
:
-0.
37
5
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
0.5
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
1876157337
}
...
...
@@ -714,6 +714,11 @@ PrefabInstance:
propertyPath
:
m_Layer
value
:
10
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52145075018362284
,
guid
:
2e3528907311e438dab0d393127aa332
,
type
:
3
}
propertyPath
:
m_GravityScale
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52145075018362285
,
guid
:
2e3528907311e438dab0d393127aa332
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
@@ -809,11 +814,6 @@ PrefabInstance:
propertyPath
:
m_MaxJumpCount
value
:
2
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52145075018362284
,
guid
:
2e3528907311e438dab0d393127aa332
,
type
:
3
}
propertyPath
:
m_GravityScale
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
6060985002925283250
,
guid
:
2e3528907311e438dab0d393127aa332
,
type
:
3
}
propertyPath
:
lowJumpMultiplier
...
...
@@ -860,7 +860,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
Cooldown
:
0
volleySize
:
10
launchPower
:
2
0
launchPower
:
1
0
attackSpeed
:
0.1
shotSpawn
:
{
fileID
:
1992150795
}
fireBall
:
{
fileID
:
1870586037468468
,
guid
:
61411254df3161c4e81f6c0a4f2cd33c
,
type
:
3
}
...
...
Assets/_Game/Scripts/Player/MovementController.cs
View file @
4a85b43e
...
...
@@ -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
)
{
...
...
Assets/_Game/Scripts/Player/PlayerAttacks/Water/PlayerWaterAttack.cs
View file @
4a85b43e
...
...
@@ -40,8 +40,9 @@ namespace _Game.Scripts.Player.PlayerAttacks.Water
var
direction
=
new
Vector3
(
position
.
x
-
transform
.
position
.
x
,
0.0f
,
0.0f
);
if
(
direction
.
x
<
0
)
{
projectile
.
transform
.
localScale
=
new
Vector3
(-
projectile
.
transform
.
localScale
.
x
,
projectile
.
transform
.
localScale
.
y
,
0.0f
);
var
localScale
=
projectile
.
transform
.
localScale
;
localScale
=
new
Vector3
(-
localScale
.
x
,
localScale
.
y
,
0.0f
);
projectile
.
transform
.
localScale
=
localScale
;
}
projectile
.
GetComponent
<
Rigidbody2D
>().
velocity
=
direction
*
launchPower
;
yield
return
new
WaitForSeconds
(
attackSpeed
);
...
...
Assets/_Game/Scripts/Player/PlayerAttacks/Water/PlayerWaterProjectile.cs
View file @
4a85b43e
...
...
@@ -7,31 +7,36 @@ namespace _Game.Scripts.Player.PlayerAttacks.Water
public
float
destroyTime
=
2.0f
;
private
float
_startTime
;
private
float
_deltaTime
;
private
float
_newScaleFactor
;
private
Vector3
_newScaleVector
;
private
Vector3
_startingScale
;
private
Rigidbody2D
_rigidbody2D
;
private
Vector2
_startingVelocity
;
private
void
Start
()
{
_startTime
=
Time
.
time
;
_startingScale
=
this
.
gameObject
.
transform
.
localScale
;
_rigidbody2D
=
GetComponent
<
Rigidbody2D
>();
_startingVelocity
=
_rigidbody2D
.
velocity
;
}
private
void
Update
()
{
_deltaTime
=
Time
.
time
-
_startTime
;
if
(!(
_deltaTime
>
1.0f
))
return
;
_deltaTime
=
(
Time
.
time
-
_startTime
)
/
destroyTime
;
print
(
"t: "
+
_deltaTime
);
_newScaleFactor
=
_deltaTime
*
(
1
-
_deltaTime
)
*
(
1
-
_deltaTime
)
/
0.1481481481481f
;
print
(
"f("
+
_deltaTime
+
")= "
+
_newScaleFactor
);
var
newScale
=
new
Vector3
(
_startingScale
.
x
*
(
2.0f
-
_deltaTime
),
_startingScale
.
y
*
(
2.0f
-
_deltaTime
),
_startingScale
.
z
*
(
2.0f
-
_deltaTime
));
_newScaleVector
=
new
Vector3
(
_newScaleFactor
,
_newScaleFactor
,
0.0f
);
this
.
gameObject
.
transform
.
localScale
=
newScale
;
this
.
gameObject
.
transform
.
localScale
=
_newScaleVector
;
_rigidbody2D
.
velocity
=
_startingVelocity
*
(
1
-
(
1
-
_deltaTime
)
*
(
1
-
_deltaTime
));
}
private
void
OnEnable
()
{
Invoke
(
"
Destroy
"
,
destroyTime
);
Invoke
(
nameof
(
Destroy
)
,
destroyTime
);
}
private
void
Destroy
()
...
...
ProjectSettings/ProjectSettings.asset
View file @
4a85b43e
...
...
@@ -235,6 +235,7 @@ PlayerSettings:
tvOSManualSigningProvisioningProfileType
:
0
appleEnableAutomaticSigning
:
0
iOSRequireARKit
:
0
iOSAutomaticallyDetectAndAddCapabilities
:
1
appleEnableProMotion
:
0
clonedFromGUID
:
c0afd0d1d80e3634a9dac47e8a0426ea
templatePackageId
:
com.unity.template.3d@1.0.4
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
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