Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ResetRun(CharacterAsset runner) {
- if (runner == null) {
- runner = _contexts.refs.levelsManager.value.characters[currentCharacterIndex];
- }
- _contexts.game.isPause = false;
- runStep = 0;
- if (!_contexts.game.isHero) {
- _entityService.CreateHero(runner);
- }
- else {
- _contexts.game.heroEntity.ReplaceCharacter(runner.Create());
- }
- _contexts.refs.ReplaceCurrentLevel(null);
- //slots
- CreateDeckSlots(runner);
- CreateBenchSlots();
- CreateRelicSlots();
- CreateHeroCards(runner);
- CreateMatrix(runner);
- CreateStartingPotion(runner); //это items
- ClearBench(); //это зона под нодами героя
- CreateServerCards(); //это дата ноды
- //game resources
- link = runner.link;
- memory = runner.memoryBank;
- credits = runner.credits;
- _entityService.UpdateHearts(true);
- _entityService.ResetGameResources(true);
- ProcessInitialEvents();
- _contexts.game.ReplaceRunManager(_contexts.game.runManager.obj);
- }
Add Comment
Please, Sign In to add comment