28 lines
832 B
C#
28 lines
832 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[System.Serializable]
|
|
public class ParallaxObjectCategoryConfig
|
|
{
|
|
public string categoryName; // 分类名称
|
|
public bool isEnabled = true; // 当前层是否启用
|
|
public GameObject[] objects; // 物体预制体
|
|
public float speed; // 移动速度
|
|
public float xSpawnRange; // X轴生成范围
|
|
|
|
public bool useIntervalGeneration; // 是否按时间间隔生成
|
|
|
|
public float spawnInterval; // 按时间间隔生成的时间间隔
|
|
public int batchSize = 3; // 每组生成的物体数量
|
|
|
|
public float batchInterval = 0.2f; // 每个物体之间的生成间隔
|
|
|
|
public float delayAfterBatch = 2f; // 每组生成后的等待时间
|
|
public float generationThreshold; // 基于距离生成的触发阈值
|
|
}
|
|
|
|
|
|
|
|
|