CangJie/Assets/Scripts//ThunderController.cs
lspdC d5836fec13 3.21(未合并)
完成火焰,碎石交互,武器升级替换。
设置好打雷演出框架,自动追击的雷击框架,尚未加入碰撞判定。
2022-03-21 19:49:15 +08:00

32 lines
669 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ThunderController : MonoBehaviour
{
public ThunderAtk thunderAtk;
public Player player;
public float frequency = 2f;
// Start is called before the first frame update
void Start()
{
InitThunder();
}
// Update is called once per frame
void Update()
{
}
public void NextLightAtk() {
Invoke(nameof(InitThunder),frequency);
}
void InitThunder() {
ThunderAtk atk;
atk = Instantiate(thunderAtk,new Vector3(player.transform.position.x,0,0), Quaternion.identity);
}
}