Commit d5b93c95 authored by Sebastian Frey's avatar Sebastian Frey
Browse files

Wasser-Attacke angepasst; ebbt jetzt ab

parent 0392f9a9
......@@ -29,7 +29,7 @@ Transform:
m_GameObject: {fileID: 7588789901055592565}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
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_Father: {fileID: 0}
m_RootOrder: 0
......
fileFormatVersion: 2
guid: 5782222d4c9b9424ea96676650e643a8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 79018af6bdd8970418e88a06fff58fb2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 371f786c630a206418f55089b139e6d4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -5,6 +5,29 @@ namespace _Game.Scripts.Player.PlayerAttacks.Water
public class PlayerWaterProjectile : MonoBehaviour
{
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()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment