1
Fork 0
mirror of https://github.com/Steffo99/beat-td.git synced 2024-11-23 15:54:18 +00:00
beat-td/Assets/Scripts/KickCollision.cs

20 lines
411 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class KickCollision : MonoBehaviour {
public int frames;
public int damage;
void Start () {
transform.rotation = Quaternion.Euler(new Vector3(0, 0, Random.Range(0, 360)));
Invoke("Disappear", Time.fixedDeltaTime * frames);
}
void Disappear ()
{
Destroy(gameObject);
}
}