Допил спавнера мобов
Работает как скрипт на emptyGameObject, через сериалайзы задаётся радиус спавна/деспавна и тип моба на спавн
This commit is contained in:
1 parent
ee7cf3946f
commit
7130513471
12 files changed
+281
-23
No files matched your search
@@ -1,11 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Code.App.Loading;
|
||||
using Code.App.StateMachine;
|
||||
using Code.Audio;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Camera.CameraStates;
|
||||
using Code.Gameplay.Character.Core;
|
||||
using Code.Gameplay.Enemies;
|
||||
using Code.Gameplay.Orders.Order;
|
||||
using Code.Gameplay.Player;
|
||||
using Code.Input;
|
||||
@@ -25,15 +23,12 @@ namespace Code.App.AppStates
|
||||
{
|
||||
public class GameplayState : BaseState<AppStateMachineContext>
|
||||
{
|
||||
|
||||
private PlayerHealth _playerHealth;
|
||||
private IPlayerScore _playerScore;
|
||||
|
||||
private IOrderService _orderService;
|
||||
|
||||
private CharacterProvider _playerCharacter;
|
||||
private List<BaseEnemy> _enemies;
|
||||
|
||||
public GameplayState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
@@ -70,9 +65,6 @@ namespace Code.App.AppStates
|
||||
}
|
||||
private async UniTask WaitForPlayerCharacterLoad() => _playerCharacter = await Context.PlayerFactory.CreatePlayer();
|
||||
|
||||
private async UniTask WaitForEnemyLoad(EnemyType type) =>
|
||||
_enemies.Add(await Context.EnemyFactory.CreateEnemy(type));
|
||||
|
||||
private async UniTaskVoid WaitForLoad()
|
||||
{
|
||||
await UniTask.WhenAll(
|
||||
|
||||
Reference in new issue
Block a user