mirror of
https://github.com/Steffo99/beat-td.git
synced 2024-11-22 07:14:19 +00:00
Some fixes
This commit is contained in:
parent
b9df3138f1
commit
142130a0df
6 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ public class BossEnemyMovement : MonoBehaviour {
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
Vector3 newPosition = Vector3.MoveTowards(transform.position, path[nextStop], speed * Mathf.Pow(Mathf.Sin(songData.songTime * Mathf.PI * songData.bpm / 480), 10) * Time.deltaTime);
|
Vector3 newPosition = Vector3.MoveTowards(transform.position, path[nextStop], speed * Mathf.Pow(Mathf.Cos(songData.songTime * Mathf.PI * songData.bpm / 480), 10) * Time.deltaTime);
|
||||||
if ((newPosition - transform.position).x < 0)
|
if ((newPosition - transform.position).x < 0)
|
||||||
{
|
{
|
||||||
transform.localScale = new Vector3(-1, 1, 1);
|
transform.localScale = new Vector3(-1, 1, 1);
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class EnemyMovement : MonoBehaviour {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update () {
|
void Update () {
|
||||||
Vector3 newPosition = Vector3.MoveTowards(transform.position, path[nextStop], speed * Mathf.Pow(Mathf.Sin(songData.songTime * Mathf.PI * songData.bpm / 60), 10) * Time.deltaTime);
|
Vector3 newPosition = Vector3.MoveTowards(transform.position, path[nextStop], speed * Mathf.Pow(Mathf.Cos(songData.songTime * Mathf.PI * songData.bpm / 60), 10) * Time.deltaTime);
|
||||||
if ((newPosition - transform.position).x < 0)
|
if ((newPosition - transform.position).x < 0)
|
||||||
{
|
{
|
||||||
transform.localScale = new Vector3(-1, 1, 1);
|
transform.localScale = new Vector3(-1, 1, 1);
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class LargeEnemyMovement : MonoBehaviour {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update () {
|
void Update () {
|
||||||
Vector3 newPosition = Vector3.MoveTowards(transform.position, path[nextStop], speed * Mathf.Pow(Mathf.Sin(songData.songTime * Mathf.PI * songData.bpm / 240), 2) * Time.deltaTime);
|
Vector3 newPosition = Vector3.MoveTowards(transform.position, path[nextStop], speed * Mathf.Pow(Mathf.Cos(songData.songTime * Mathf.PI * songData.bpm / 240), 2) * Time.deltaTime);
|
||||||
Vector3 difference = newPosition - transform.position;
|
Vector3 difference = newPosition - transform.position;
|
||||||
if (difference.y > 0)
|
if (difference.y > 0)
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue