r2mods/ilspy_dump/ror2_csproj/RoR2/BodySpawnCard.cs

19 lines
576 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
using UnityEngine.Networking;
namespace RoR2;
[CreateAssetMenu(menuName = "RoR2/SpawnCards/BodySpawnCard")]
public class BodySpawnCard : SpawnCard
{
protected override void Spawn(Vector3 position, Quaternion rotation, DirectorSpawnRequest directorSpawnRequest, ref SpawnResult result)
{
Vector3 position2 = position;
position2.y += Util.GetBodyPrefabFootOffset(prefab);
GameObject gameObject = Object.Instantiate(prefab, position2, rotation);
NetworkServer.Spawn(gameObject);
result.spawnedInstance = gameObject;
result.success = true;
}
}