1
0
Fork 0
boss-room/Assets/Scripts/Fireball.cs
Ava Gaiety Wroten 425450a137 Hero spawner WIP
2021-07-10 21:53:12 -05:00

20 lines
367 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Fireball : MonoBehaviour
{
public float speed = 1.0f;
public Vector3 destination;
void Update()
{
Move();
}
void Move()
{
float step = speed * Time.deltaTime;
transform.position = Vector3.MoveTowards(transform.position, destination, step);
}
}