2025-02-12 08:43:33 +08:00

24 lines
668 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/*******************************************************************************
*Create By CG
*Function 对象池管理_测试
*******************************************************************************/
namespace ZXK.Test
{
public class Bullet : MonoBehaviour
{
public void OnSpawn()
{
Debug.Log("生成游戏对象!");
}
public void OnDespawn()
{
Debug.Log("回收游戏对象");
transform.position = Vector3.zero;
GetComponent<Rigidbody>().velocity = Vector3.zero;
}
}
}