mirror of
https://github.com/Steffo99/beat-td.git
synced 2024-11-23 07:44:19 +00:00
21 lines
411 B
C#
21 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);
|
|||
|
}
|
|||
|
|
|||
|
}
|