You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Scripts/Finish.cs

21 lines
470 B
C#

2 months ago
using System;
using D2D.Core;
using D2D.Gameplay;
using D2D.Utilities;
using UnityEngine;
namespace D2D
{
public class Finish : OnceObjectInteractor<Player>
{
[SerializeField] private GameObject _activateOnWin;
protected override void OnInteract(Player player)
{
this.FindLazy<GameStateMachine>().Push(new WinState());
// Confetti, win camera, etc.
_activateOnWin.On();
}
}
}