31 lines
903 B
C#
31 lines
903 B
C#
using Code.Infrastructure.App;
|
|
using Code.Infrastructure.Generators;
|
|
using Code.Infrastructure.Input;
|
|
using Code.Infrastructure.SceneLoader;
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
namespace Code.Game.Musician.GameStates
|
|
{
|
|
[State(typeof(AppStates), typeof(AppStateMachineContext))]
|
|
public partial class FirstEnemyState
|
|
{
|
|
public FirstEnemyState(AppStateMachineContext context) : base(context)
|
|
{
|
|
}
|
|
|
|
public override AppStates MyState => AppStates.FirstEnemyState;
|
|
|
|
public override async UniTask EnterState()
|
|
{
|
|
Context.InputService.EnableMap(ActionMappings.RhythmPlay);
|
|
await Context.SceneLoader.UnloadSceneAsync(SceneId.RhythmPlay); // TODO Unload
|
|
}
|
|
|
|
public override async UniTask ExitState()
|
|
{
|
|
Context.InputService.DisableMap(ActionMappings.RhythmPlay);
|
|
|
|
|
|
}
|
|
}
|
|
} |