r2mods/ilspy_dump/ror2_csproj/EntityStates.Missions.Golds.../ActivateBeacons.cs

35 lines
829 B
C#

using RoR2;
using UnityEngine.Networking;
namespace EntityStates.Missions.Goldshores;
public class ActivateBeacons : EntityState
{
public override void OnEnter()
{
base.OnEnter();
if ((bool)GoldshoresMissionController.instance)
{
GoldshoresMissionController.instance.SpawnBeacons();
}
}
public override void OnExit()
{
base.OnExit();
if (!outer.destroying && (bool)GoldshoresMissionController.instance)
{
GoldshoresMissionController.instance.BeginTransitionIntoBossfight();
}
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (NetworkServer.active && (bool)GoldshoresMissionController.instance && GoldshoresMissionController.instance.beaconsActive >= GoldshoresMissionController.instance.beaconsRequiredToSpawnBoss)
{
outer.SetNextState(new GoldshoresBossfight());
}
}
}