27 lines
427 B
C#
27 lines
427 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[Serializable]
|
|
public class RandomLightningPosition : MonoBehaviour
|
|
{
|
|
public float timer;
|
|
|
|
public virtual void Start()
|
|
{
|
|
}
|
|
|
|
public virtual void Update()
|
|
{
|
|
timer += Time.deltaTime;
|
|
if (!(timer < 2f))
|
|
{
|
|
transform.localPosition = new Vector3(UnityEngine.Random.Range(-200, 200), 45f, UnityEngine.Random.Range(-200, 200));
|
|
timer = 0f;
|
|
}
|
|
}
|
|
|
|
public virtual void Main()
|
|
{
|
|
}
|
|
}
|