инишиал спавнер мобов, нуждаюсь в консультации
This commit is contained in:
1 parent
e654a0daf4
commit
bd495a644f
12 files changed
+108
-1301
No files matched your search
@@ -1,8 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
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.Player;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
@@ -27,6 +29,7 @@ namespace Code.App.AppStates
|
||||
private PlayerMoney _playerMoney;
|
||||
|
||||
private CharacterProvider _playerCharacter;
|
||||
private List<BaseEnemy> _enemies;
|
||||
|
||||
public GameplayState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
@@ -59,6 +62,9 @@ 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 WaitForSceneToLoad()
|
||||
{
|
||||
await UniTask.WhenAll(
|
||||
|
||||
Reference in new issue
Block a user