27 lines
445 B
C#
27 lines
445 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Fireworks : MonoBehaviour
|
|
{
|
|
public float playTime = 2;
|
|
|
|
public float curTime = 0;
|
|
|
|
private void Start()
|
|
{
|
|
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
curTime+= Time.deltaTime;
|
|
if (curTime >= playTime)
|
|
{
|
|
GameManager.Ins.PlaySound3D("烟花音效",transform,true);
|
|
curTime = 0;
|
|
}
|
|
}
|
|
}
|