Esempio n. 1
0
    public EnemySystem(
        GameplayResources gameplayResources,
        GameConfig gameConfig,
        PlayerCombatSystem playerCombatSystem)
    {
        _gameplayResources = gameplayResources;
        _gameConfig        = gameConfig;

        _enemyDef = _gameConfig.enemyConfig.basicEnemy;

        _dispatcher = Singleton.instance.notificationDispatcher;
        _dispatcher.AddListener(GameplayEventType.ENEMY_KILLED, OnEnemyDestroyed);
    }
    public PlayerCombatSystem(
        GameplayResources gameplayResources,
        GameConfig gameConfig)
    {
        _gameplayResources = gameplayResources;
        _gameConfig        = gameConfig;

        string[] list = { "BoardLayer" };
        _boardLayer = LayerMask.GetMask(list);


        isEnabled   = false;
        _dispatcher = Singleton.instance.notificationDispatcher;
    }
    public GameplayState(
        GameStateMachine<JamStateType> gameStateMachine,
        GuiManager gui,
        GameConfig gameConfig,
        DiContainer diContainer,
        GameplayResources gameplayResources,
        [Inject(Id = GameInstaller.GLOBAL_DISPATCHER)]
        IEventDispatcher dispatcher)
    {
        _gameStateMachine = gameStateMachine;
        _gui = gui;
        _gameConfig = gameConfig;
        _gameplayResources = gameplayResources;
        _diContainer = diContainer;
        _dispatcher = dispatcher;

    }