blob: fd822fe4203a57dec5baa7ecc393f422a1cd9f63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using UnityEngine;
public class MoveTransformGravity : MonoBehaviour
{
public float amount = 1f;
public float pow = 1.5f;
private MoveTransform move;
private float counter;
private void Start()
{
move = GetComponentInParent<MoveTransform>();
}
private void Update()
{
counter += TimeHandler.deltaTime;
move.velocity += Vector3.down * Mathf.Pow(amount * counter, pow);
}
}
|