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

21 lines
411 B
C#
Raw Normal View History

2018-04-22 21:05:11 +00:00
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);
}
}