Unity 2D 粒子模擬系統——各模組詳細介紹與程式碼
以下章節將逐一介紹本專案的模組化 C# 腳本,並附上完整程式碼範例與重點說明,讓你在部落格中能直接貼上閱讀。
1. ParticleManager.cs
功能:負責粒子(GameObject)實例化、質量設定、顏色與標籤管理
// ParticleManager.cs
using UnityEngine;
using TMPro;
using System.Collections.Generic;
public class ParticleManager : MonoBehaviour
{
...
fish0048.hashnode.dev6 min read