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
d5b93c95
Commit
d5b93c95
authored
Mar 27, 2019
by
Sebastian Frey
Browse files
Wasser-Attacke angepasst; ebbt jetzt ab
parent
0392f9a9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Assets/_Game/Prefabs/Elemental Attacks/WaterAttack.prefab
View file @
d5b93c95
...
@@ -29,7 +29,7 @@ Transform:
...
@@ -29,7 +29,7 @@ Transform:
m_GameObject
:
{
fileID
:
7588789901055592565
}
m_GameObject
:
{
fileID
:
7588789901055592565
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
1
.5
,
y
:
1
.5
,
z
:
1
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_RootOrder
:
0
...
...
Assets/_Game/Scripts/Interaction.meta
0 → 100644
View file @
d5b93c95
fileFormatVersion: 2
guid: 5782222d4c9b9424ea96676650e643a8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Scripts/Player/PlayerAttacks/Player_FireAttack.cs.meta
0 → 100644
View file @
d5b93c95
fileFormatVersion: 2
guid: 79018af6bdd8970418e88a06fff58fb2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Scripts/Player/PlayerAttacks/Player_FireProjectile.cs.meta
0 → 100644
View file @
d5b93c95
fileFormatVersion: 2
guid: 371f786c630a206418f55089b139e6d4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Scripts/Player/PlayerAttacks/Water/PlayerWaterProjectile.cs
View file @
d5b93c95
...
@@ -5,6 +5,29 @@ namespace _Game.Scripts.Player.PlayerAttacks.Water
...
@@ -5,6 +5,29 @@ namespace _Game.Scripts.Player.PlayerAttacks.Water
public
class
PlayerWaterProjectile
:
MonoBehaviour
public
class
PlayerWaterProjectile
:
MonoBehaviour
{
{
public
float
destroyTime
=
2.0f
;
public
float
destroyTime
=
2.0f
;
private
float
_startTime
;
private
float
_deltaTime
;
private
Vector3
_startingScale
;
private
void
Start
()
{
_startTime
=
Time
.
time
;
_startingScale
=
this
.
gameObject
.
transform
.
localScale
;
}
private
void
Update
()
{
_deltaTime
=
Time
.
time
-
_startTime
;
if
(!(
_deltaTime
>
1.0f
))
return
;
var
newScale
=
new
Vector3
(
_startingScale
.
x
*
(
2.0f
-
_deltaTime
),
_startingScale
.
y
*
(
2.0f
-
_deltaTime
),
_startingScale
.
z
*
(
2.0f
-
_deltaTime
));
this
.
gameObject
.
transform
.
localScale
=
newScale
;
}
private
void
OnEnable
()
private
void
OnEnable
()
{
{
...
...
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