r2mods/ilspy_dump/ror2_csproj/RoR2/MultiCharacterSpawnCard.cs

16 lines
528 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace RoR2;
[CreateAssetMenu(menuName = "RoR2/SpawnCards/MultiCharacterSpawnCard")]
public class MultiCharacterSpawnCard : CharacterSpawnCard
{
public GameObject[] masterPrefabs;
protected override void Spawn(Vector3 position, Quaternion rotation, DirectorSpawnRequest directorSpawnRequest, ref SpawnResult result)
{
prefab = masterPrefabs[(int)(directorSpawnRequest.rng.nextNormalizedFloat * (float)masterPrefabs.Length)];
base.Spawn(position, rotation, directorSpawnRequest, ref result);
}
}