54 lines
1.1 KiB
C#
54 lines
1.1 KiB
C#
// ***********************************************************************
|
|
// Assembly : Game
|
|
// Author : Kimch
|
|
// Created : 2020-09-02
|
|
// Description :
|
|
// Last Modified By :
|
|
// Last Modified On :
|
|
// ***********************************************************************
|
|
// <copyright file= "Ef_boom" company="Kimch"></copyright>
|
|
// <summary></summary>
|
|
// ***********************************************************************
|
|
using UnityEngine;
|
|
|
|
namespace G
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class Ef_boom : MonoBehaviour
|
|
{
|
|
public ParticleSystem myparticle;
|
|
|
|
private Material _material;
|
|
|
|
private Collider _collider;
|
|
|
|
public Texture2D[] pttex = new Texture2D[3];
|
|
|
|
private void Awake()
|
|
{
|
|
_collider = this.GetComponent<Collider>();
|
|
}
|
|
|
|
public void SetTex(int index, Vector3 pos, bool collider)
|
|
{
|
|
pos.y = 0.02f;
|
|
transform.position = pos;
|
|
myparticle.Play();
|
|
if (collider)
|
|
{
|
|
_collider.enabled = true;
|
|
}
|
|
Invoke(nameof(EmitStop), 0.5f);
|
|
}
|
|
|
|
private void EmitStop()
|
|
{
|
|
myparticle.Stop();
|
|
_collider.enabled = false;
|
|
transform.position = Vector3.up * 11f;
|
|
}
|
|
}
|
|
}
|