123456789101112131415161718192021222324252627282930 |
- #if !COMBAT_SERVER
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using Fort23.Core;
- using UnityEngine;
- [AddComponentMenu("特效脚本/延迟显示/延迟显示")]
- public class DelayShow : MonoBehaviour
- {
- public float delayTime;
- public void Init()
- {
- gameObject.SetActive(false);
- TimerComponent.Instance.AddTimer((int) (delayTime * 1000), delegate
- {
- TrailRenderer trailRenderer= gameObject.GetComponent<TrailRenderer>();
- if (trailRenderer != null)
- {
- trailRenderer.Clear();
- }
- gameObject.SetActive(true);
- });
- }
- }
- #endif
|